Skip to content
This repository
Browse code

fix multilevel draw

  • Loading branch information...
commit 6725fc21b9775339e7dfcd27024fcbd31930d844 1 parent eb190e0
Alexander Sabourenkov authored
2  fgtestbed.py
@@ -298,7 +298,7 @@ def __init__(self, window, shaderset, gamedata,
298 298
         self.grid_shader = GridShader(shaderset)
299 299
         self.tex = namedtuple("Texnames", "dispatch blitcode font findex screen")._make(glGenTextures(5))
300 300
         
301  
-        self._zeddown = zeddown
  301
+        self._zeddown = zeddown if zeddown < len(self._zdtab) else len(self._zdtab)
302 302
         self.anim_fps = anim_fps
303 303
         self.min_psz = 3
304 304
         self.max_psz = 1024
16  shaders/step.fs
@@ -102,6 +102,8 @@ vec4 blit_execute(in vec2 pc, in uint mode, in uint cindex, in vec4 fg, in vec4
102 102
             rv.a = 1.0;
103 103
             break;
104 104
         case int(BM_NONE):
  105
+            rv = vec4(0,0,0,0);
  106
+            break;
105 107
         default:
106 108
             rv = vec4(float(mode)/16.0,0,0,1);
107 109
             break;
@@ -130,24 +132,30 @@ void main() {
130 132
     }
131 133
 
132 134
     if (hidden > 0u) {
133  
-        frag = vec4(0.5, 0.5, 0.5, 1.0);
  135
+        frag = vec4(0.23, 0.23, 0.23, 1.0);
134 136
         return;
135 137
     }
136 138
 
137 139
     vec4 color = blit_execute(pc, fl_mode, fl_cindex, fl_fg, fl_bg, debug2, debug3);
138 140
 
139 141
     if (debug_active > 0) {
  142
+        debug3.w = uint(color.a * 255.0);
140 143
         frag = debug_output(debug0, debug1, debug2, debug3);
141 144
         return;
142 145
     }
143 146
     
144  
-    if (liquicolor.a > 0.1)
145  
-        color = mix(liquicolor, color, 0.5);
  147
+    if (liquicolor.a > 0.1) {
  148
+        if (fl_mode == BM_NONE) {
  149
+            color = vec4(liquicolor.rgb, 0.75);
  150
+        } else {
  151
+            color = mix(liquicolor, color, 0.5);
  152
+        }
  153
+    }
146 154
     
147 155
     color.rgb *= darken;
148 156
     
149 157
     if (mouse > 0u)
150 158
         borderglow(color, mouse_color);
151  
-    
  159
+
152 160
     frag = color;
153 161
 }

0 notes on commit 6725fc2

Please sign in to comment.
Something went wrong with that request. Please try again.