xuxiandi / angleproject

Automatically exported from code.google.com/p/angleproject
Other
0 stars 0 forks source link

Error "Vertex shader sampler count exceeds MAX_VERTEX_TEXTURE_IMAGE_UNITS (4).", but only two is used #247

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Go to http://codeflow.org/webgl/craftscape/

What is the expected output? What do you see instead?

The demo works on Linux.

water/display.shader: program link: undefined: (209,9): warning X3206: implicit 
truncation of vector type
(182,21): warning X3571: pow(f, e) will not work for negative f, use abs(f) or 
conditionally handle negative values if you expect them

Vertex shader sampler count exceeds MAX_VERTEX_TEXTURE_IMAGE_UNITS (4).

What version of the product are you using? On what operating system?

Chrome 16.0.912.32, Windows 7, ATI HD5650

Please provide any additional information below.

The easiest way to modify the shader so that it compiles is to change the name 
of texture 'water_heights', which is used in both vertex and fragment shader. 
Haven't isolated the issue any more for now.

Original issue reported on code.google.com by mrs...@gmail.com on 11 Nov 2011 at 1:15

Attachments:

GoogleCodeExporter commented 9 years ago
Thanks for reporting this. I quickly found the actual bug: We're using the 
shader constant's register index as the sampler index. This turns out to be 
correct for pixel shaders, but not for vertex shaders. There's a 
ID3DXConstantTable::GetSamplerIndex method to retrieve the actual index.

So this should be easy to fix...

Original comment by nicolas....@gmail.com on 12 Nov 2011 at 4:49

GoogleCodeExporter commented 9 years ago

Original comment by nicolas....@gmail.com on 14 Nov 2011 at 9:12

GoogleCodeExporter commented 9 years ago
Should be fixed in r880.

Original comment by nicolas....@gmail.com on 14 Nov 2011 at 9:22