diff options
author | Sven Gothel <[email protected]> | 2015-07-16 05:49:41 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2015-07-16 05:49:41 +0200 |
commit | 0b62f343f5c2ca74d10d86c435099ce0e0ab89db (patch) | |
tree | cd0e5ad3d0618e4a3d41bb7c9943eb489085b5ed | |
parent | 7bcf094c8c1be5eeec60c52e09fd8f32f42cd654 (diff) |
PointShader: Use same precision for shared uniform in vertex- and fragment shader
On GNU/Linux NVidia 340.76 the test TestGLPointsNEWT failed otherwise:
error: precision mismatch between shaders for uniform (named mgl_PointParams[0])
error: precision mismatch between shaders for uniform (named mgl_PointParams[1])
3 files changed, 16 insertions, 4 deletions
diff --git a/make/scripts/tests.sh b/make/scripts/tests.sh index eeec83ec1..083a6d78b 100644 --- a/make/scripts/tests.sh +++ b/make/scripts/tests.sh @@ -409,7 +409,7 @@ function testawtswt() { #testnoawt com.jogamp.opengl.test.junit.jogl.acore.TestGLProfile02NEWTNoARBCtx $* #testnoawt com.jogamp.opengl.test.junit.jogl.acore.TestGLProfile03NEWTOffscreen $* #testnoawt com.jogamp.opengl.test.junit.jogl.acore.TestGLProfile04NEWTOffscreenNoARBCtx $* -testawt com.jogamp.opengl.test.junit.jogl.acore.TestVersionSemanticsNOUI $* +#testawt com.jogamp.opengl.test.junit.jogl.acore.TestVersionSemanticsNOUI $* # # Stereo @@ -547,7 +547,7 @@ testawt com.jogamp.opengl.test.junit.jogl.acore.TestVersionSemanticsNOUI $* #testnoawt com.jogamp.opengl.test.junit.jogl.acore.TestFBOMix2DemosES2NEWT $* #testnoawt com.jogamp.opengl.test.junit.jogl.acore.TestFBOMRTNEWT01 $* -#testnoawt com.jogamp.opengl.test.junit.jogl.acore.TestGLPointsNEWT $* +testnoawt com.jogamp.opengl.test.junit.jogl.acore.TestGLPointsNEWT $* #testnoawt com.jogamp.opengl.test.junit.jogl.acore.TestGLMesaBug651NEWT $* #testnoawt com.jogamp.opengl.test.junit.jogl.acore.TestGLMesaBug658NEWT $* #testnoawt com.jogamp.opengl.test.junit.jogl.acore.TestX11DefaultDisplay $* diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/shader/PointsShader.fp b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/shader/PointsShader.fp index 3210762b1..82268958f 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/shader/PointsShader.fp +++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/shader/PointsShader.fp @@ -6,9 +6,15 @@ #define mgl_FragColor gl_FragColor #endif +#ifdef GL_ES + #define MEDIUMP mediump +#else + #define MEDIUMP +#endif + // [0].rgba: 0, smooth, attnMinSz, attnMaxSz // [1].rgba: attnCoeff(3), attnFadeTs -uniform vec4 mgl_PointParams[2]; +uniform MEDIUMP vec4 mgl_PointParams[2]; #define pointSmooth (mgl_PointParams[0].g) diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/shader/PointsShader.vp b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/shader/PointsShader.vp index 4fa49b901..562874785 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/shader/PointsShader.vp +++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/shader/PointsShader.vp @@ -4,12 +4,18 @@ #define varying out #endif +#ifdef GL_ES + #define MEDIUMP mediump +#else + #define MEDIUMP +#endif + uniform vec4 mgl_ColorStatic; uniform mat4 mgl_PMVMatrix[4]; // P, Mv, Mvi and Mvit (transpose(inverse(ModelView)) == normalMatrix) // [0].rgba: 0, smooth, attnMinSz, attnMaxSz // [1].rgba: attnCoeff(3), attnFadeTs -uniform vec4 mgl_PointParams[2]; +uniform MEDIUMP vec4 mgl_PointParams[2]; #define pointSmooth (mgl_PointParams[0].g) #define pointSizeMin (mgl_PointParams[0].b) |