|
Hey everyone, If in a shader I have a fragment program that has a for loop in it such as: ... int number_of_runs = 5; for(int i; i < number_of_runs; i++) { ... } ... I get this as an error:
If however I change the loop to: ... for(int i; i < 5; i++) { ... } ... the shader compiles. Is this an issue with Shaderlab not supporting dynamic for loops or is it something to do with my graphics card (dual 8800GTX) or something else entirely? Thanks in advance, Ryan Note: Heavily edited because I wasn't really asking what I meant to ask in the original post.
(comments are locked)
|
|
Try using a higher shader profile e.g.
documented here: http://unity3d.com/support/documentation/Components/SL-ShaderPrograms.html#target that got rid of error C5013, now it's telling me I need a vertex program too. I think I need to spend more time reading the docs. Aren't 8800's SM3 cards though?
May 22 '10 at 11:29 PM
Random Indie
Gah, missed the part where it says they get compiled into 1.1 by default. Thanks Mike!
May 22 '10 at 11:46 PM
Random Indie
(comments are locked)
|

Not sure if this is relevant but I just mucked with the render emulation and when I set it back to No Emulation I get a console error saying no subshaders can be run on this graphics card.