Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Green Gandalf Please help

Author
Message
Juggernaut
14
Years of Service
User Offline
Joined: 12th Mar 2012
Location:
Posted: 13th Aug 2013 05:16
Green Gandalf when I try to compile your terrain shader codes in DBPro 7.62 I always get the compilation error -

for AdvTerrDiffuseShaderDemo - source code attached as zip along with this post.

Quote: "Subscript must be Integer or DWORD when referencing an array at line 167."


What is going wrong here ?
WickedX
17
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 13th Aug 2013 05:30 Edited at: 13th Aug 2013 05:39
The min and max functions require the Matrix1 Utility Plug-ins. Alternately, you can write you own min/max functions.

Juggernaut
14
Years of Service
User Offline
Joined: 12th Mar 2012
Location:
Posted: 13th Aug 2013 15:58
Thank you WickedX for the information and the code.
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 13th Aug 2013 16:21
Yep, that's the problem. I often forget to warn about that.



Powered by Free Banners
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 13th Aug 2013 16:35
Quote: "Green Gandalf: Thank you for the shader. Is bump mapping better than normal mapping in increasing the surface detail or is it otherwise?"


The two terms are often used interchangeably - unless you mean bump mapping or relief mapping using a height map. Normal mapping is simpler but relief mapping gives somewhat more realistic results. Personally I'd get some experience using normal mapping first and move on to more advanced techniques like relief mapping later.



Powered by Free Banners
Juggernaut
14
Years of Service
User Offline
Joined: 12th Mar 2012
Location:
Posted: 14th Aug 2013 01:03
Green Gandalf: Thanks for the advice. Your examples are compiling now
after I installed Matrix 1 Utility plugin. I will try to add relief mapping shader that comes with Dark Shader to your shader and see if it works or not.

Login to post a reply

Server time is: 2026-07-09 02:35:22
Your offset time is: 2026-07-09 02:35:22