Open mean-ui-thread opened 5 years ago
I managed to fixed it by doing these two changes:
diff --git a/examples/37-gpudrivenrendering/fs_gdr_instanced_indirect_rendering.sc b/examples/37-gpudrivenrendering/fs_gdr_instanced_indirect_rendering.sc
index 14f484991..6ad17cb3b 100644
--- a/examples/37-gpudrivenrendering/fs_gdr_instanced_indirect_rendering.sc
+++ b/examples/37-gpudrivenrendering/fs_gdr_instanced_indirect_rendering.sc
@@ -11,12 +11,12 @@ uniform vec4 u_color[32];
void main()
{
- vec4 color = u_color[uint(v_materialID)];
+ vec4 color = u_color[int(v_materialID)];
if (color.w < 1.0f)
{
//render dithered alpha
- if ( (int(gl_FragCoord.x) % 2) == (int(gl_FragCoord.y) % 2) )
+ if ( mod(gl_FragCoord.x, 2.0) == mod(gl_FragCoord.y, 2.0) )
{
discard;
}
diff --git a/examples/37-gpudrivenrendering/varying.def.sc b/examples/37-gpudrivenrendering/varying.def.sc
index bab2e384d..f0615767d 100644
--- a/examples/37-gpudrivenrendering/varying.def.sc
+++ b/examples/37-gpudrivenrendering/varying.def.sc
@@ -6,4 +6,4 @@ vec4 i_data2 : TEXCOORD5;
vec4 i_data3 : TEXCOORD4;
vec2 v_texcoord0 : TEXCOORD0;
-flat float v_materialID : TEXCOORD0;
+float v_materialID : TEXCOORD0;
same issue with
--platform nacl
and--platform asm.js