summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2023-03-30 23:32:05 +0200
committerSven Gothel <[email protected]>2023-03-30 23:32:05 +0200
commit759a381963476e2e64b7afba0d6ef2bafeb35417 (patch)
tree6af30a52d8b9a089548c219b3ab9ad0996e6946f /src
parent6af985dc6d2c848a899bfea4f82540e8db181988 (diff)
Graph Shader: Complete the USE_DISCARD logic avoiding output set after discard, even though technically allowed (ignored after discard)
Diffstat (limited to 'src')
-rw-r--r--src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-pass2-msaa.glsl6
-rw-r--r--src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-pass2-vbaa_allprop01.glsl9
-rw-r--r--src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-pass2-vbaa_bforce_even.glsl10
-rw-r--r--src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-pass2-vbaa_bforce_odd.glsl10
-rw-r--r--src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-pass2-vbaa_flipquad.glsl9
-rw-r--r--src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-pass2-vbaa_flipquad2.glsl8
-rw-r--r--src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-pass2-vbaa_flipquad3.glsl8
-rw-r--r--src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-pass2-vbaa_poles_bilin1.glsl9
-rw-r--r--src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-pass2-vbaa_polesequal.glsl9
-rw-r--r--src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-pass2-vbaa_polesprop01.glsl9
-rw-r--r--src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-pass2-vbaa_quincunx.glsl8
-rw-r--r--src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-pass2-vbaa_rgss.glsl8
12 files changed, 67 insertions, 36 deletions
diff --git a/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-pass2-msaa.glsl b/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-pass2-msaa.glsl
index d9d85e0e9..36d70cbdf 100644
--- a/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-pass2-msaa.glsl
+++ b/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-pass2-msaa.glsl
@@ -3,8 +3,10 @@
#if USE_DISCARD
if( 0.0 == t.a ) {
discard; // discard freezes NV tegra2 compiler
+ } else {
+ mgl_FragColor = t;
}
+ #else
+ mgl_FragColor = t;
#endif
- mgl_FragColor = t;
-
diff --git a/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-pass2-vbaa_allprop01.glsl b/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-pass2-vbaa_allprop01.glsl
index 4a843c6e3..86d74c5ec 100644
--- a/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-pass2-vbaa_allprop01.glsl
+++ b/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-pass2-vbaa_allprop01.glsl
@@ -105,9 +105,12 @@
}
#if USE_DISCARD
- if(t.w == 0.0){
+ if( 0.0 == t.w ) {
discard; // discard freezes NV tegra2 compiler
+ } else {
+ mgl_FragColor = t;
}
+ #else
+ mgl_FragColor = t;
#endif
-
- mgl_FragColor = t;
+
diff --git a/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-pass2-vbaa_bforce_even.glsl b/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-pass2-vbaa_bforce_even.glsl
index d69bc0e32..e83e21a55 100644
--- a/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-pass2-vbaa_bforce_even.glsl
+++ b/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-pass2-vbaa_bforce_even.glsl
@@ -87,10 +87,14 @@
#endif
#endif
#endif
+
#if USE_DISCARD
- if(t.w == 0.0){
+ if( 0.0 == t.w ) {
discard; // discard freezes NV tegra2 compiler
+ } else {
+ mgl_FragColor = t;
}
+ #else
+ mgl_FragColor = t;
#endif
-
- mgl_FragColor = t;
+
diff --git a/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-pass2-vbaa_bforce_odd.glsl b/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-pass2-vbaa_bforce_odd.glsl
index acc1da7e2..a3c61e595 100644
--- a/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-pass2-vbaa_bforce_odd.glsl
+++ b/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-pass2-vbaa_bforce_odd.glsl
@@ -78,10 +78,14 @@
#endif
#endif
#endif
+
#if USE_DISCARD
- if(t.w == 0.0){
+ if( 0.0 == t.w ) {
discard; // discard freezes NV tegra2 compiler
+ } else {
+ mgl_FragColor = t;
}
+ #else
+ mgl_FragColor = t;
#endif
-
- mgl_FragColor = t;
+
diff --git a/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-pass2-vbaa_flipquad.glsl b/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-pass2-vbaa_flipquad.glsl
index d1499549f..56c877f28 100644
--- a/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-pass2-vbaa_flipquad.glsl
+++ b/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-pass2-vbaa_flipquad.glsl
@@ -30,12 +30,13 @@
t += GetSample(gcu_FboTexUnit, texCoord, psize, edge1H, edgeTH, 0.0, 0.0)*0.25; // upper-right [p1]
}
-
#if USE_DISCARD
- if(t.w == 0.0){
+ if( 0.0 == t.w ) {
discard; // discard freezes NV tegra2 compiler
+ } else {
+ mgl_FragColor = t;
}
+ #else
+ mgl_FragColor = t;
#endif
-
- mgl_FragColor = t;
diff --git a/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-pass2-vbaa_flipquad2.glsl b/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-pass2-vbaa_flipquad2.glsl
index 55710f18a..03a6968a0 100644
--- a/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-pass2-vbaa_flipquad2.glsl
+++ b/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-pass2-vbaa_flipquad2.glsl
@@ -32,10 +32,12 @@
}
#if USE_DISCARD
- if(t.w == 0.0){
+ if( 0.0 == t.w ) {
discard; // discard freezes NV tegra2 compiler
+ } else {
+ mgl_FragColor = t;
}
+ #else
+ mgl_FragColor = t;
#endif
-
- mgl_FragColor = t;
diff --git a/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-pass2-vbaa_flipquad3.glsl b/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-pass2-vbaa_flipquad3.glsl
index 5d5c8c924..bc0044aab 100644
--- a/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-pass2-vbaa_flipquad3.glsl
+++ b/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-pass2-vbaa_flipquad3.glsl
@@ -100,10 +100,12 @@
#endif
#if USE_DISCARD
- if(t.w == 0.0){
+ if( 0.0 == t.w ) {
discard; // discard freezes NV tegra2 compiler
+ } else {
+ mgl_FragColor = t;
}
+ #else
+ mgl_FragColor = t;
#endif
-
- mgl_FragColor = t;
diff --git a/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-pass2-vbaa_poles_bilin1.glsl b/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-pass2-vbaa_poles_bilin1.glsl
index 48f4f93ea..06b70c71f 100644
--- a/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-pass2-vbaa_poles_bilin1.glsl
+++ b/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-pass2-vbaa_poles_bilin1.glsl
@@ -83,9 +83,12 @@
}
#if USE_DISCARD
- if(t.w == 0.0){
+ if( 0.0 == t.w ) {
discard; // discard freezes NV tegra2 compiler
+ } else {
+ mgl_FragColor = t;
}
+ #else
+ mgl_FragColor = t;
#endif
-
- mgl_FragColor = t;
+
diff --git a/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-pass2-vbaa_polesequal.glsl b/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-pass2-vbaa_polesequal.glsl
index d83a1e6a2..93f4e1114 100644
--- a/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-pass2-vbaa_polesequal.glsl
+++ b/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-pass2-vbaa_polesequal.glsl
@@ -39,11 +39,14 @@
}
}
}
+
#if USE_DISCARD
- if(t.w == 0.0){
+ if( 0.0 == t.w ) {
discard; // discard freezes NV tegra2 compiler
+ } else {
+ mgl_FragColor = t;
}
+ #else
+ mgl_FragColor = t;
#endif
-
- mgl_FragColor = t;
diff --git a/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-pass2-vbaa_polesprop01.glsl b/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-pass2-vbaa_polesprop01.glsl
index 5d8bdff66..f988957ab 100644
--- a/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-pass2-vbaa_polesprop01.glsl
+++ b/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-pass2-vbaa_polesprop01.glsl
@@ -57,9 +57,12 @@
}
#if USE_DISCARD
- if(t.w == 0.0){
+ if( 0.0 == t.w ) {
discard; // discard freezes NV tegra2 compiler
+ } else {
+ mgl_FragColor = t;
}
+ #else
+ mgl_FragColor = t;
#endif
-
- mgl_FragColor = t;
+
diff --git a/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-pass2-vbaa_quincunx.glsl b/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-pass2-vbaa_quincunx.glsl
index 19b738305..0d6c02715 100644
--- a/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-pass2-vbaa_quincunx.glsl
+++ b/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-pass2-vbaa_quincunx.glsl
@@ -19,10 +19,12 @@
t += GetSample(gcu_FboTexUnit, texCoord, psize, edgeH, edgeH, 0.0, 0.0)*0.125; // w5
#if USE_DISCARD
- if(t.w == 0.0){
+ if( 0.0 == t.w ) {
discard; // discard freezes NV tegra2 compiler
+ } else {
+ mgl_FragColor = t;
}
+ #else
+ mgl_FragColor = t;
#endif
-
- mgl_FragColor = t;
diff --git a/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-pass2-vbaa_rgss.glsl b/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-pass2-vbaa_rgss.glsl
index f80ce45fa..b2dc80941 100644
--- a/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-pass2-vbaa_rgss.glsl
+++ b/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-pass2-vbaa_rgss.glsl
@@ -16,10 +16,12 @@
t += GetSample(gcu_FboTexUnit, texCoord, psize, edge1Q, 0.0, 0.5, -0.5)*0.25; // lower-right [p4]
#if USE_DISCARD
- if(t.w == 0.0){
+ if( 0.0 == t.w ) {
discard; // discard freezes NV tegra2 compiler
+ } else {
+ mgl_FragColor = t;
}
+ #else
+ mgl_FragColor = t;
#endif
-
- mgl_FragColor = t;