Project

General

Profile

« Previous | Next » 

Revision dae661e9

Added by Leszek Koltunski about 5 years ago

Invert the order of Matrix Effects. Now, just as in the other queues, the first matrix effect is actually the first to act on the object - not the other way around!

View differences:

src/main/java/org/distorted/examples/stencil/StencilRenderer.java
162 162
      // middle of the screen.
163 163
      /////////////////////////////////////////////////////////////////////////////////////////////////////
164 164
      // The cube
165
      cube1Effects.apply( move2 );
166
      cube1Effects.apply( rotaX );
167
      cube1Effects.apply( rotaZ );
168
      cube1Effects.apply( scale );
169 165
      cube1Effects.apply( move1 );
166
      cube1Effects.apply( scale );
167
      cube1Effects.apply( rotaZ );
168
      cube1Effects.apply( rotaX );
169
      cube1Effects.apply( move2 );
170 170
      /////////////////////////////////////////////////////////////////////////////////////////////////////
171 171
      // Floor
172
      floorEffects.apply( move2 );
173
      floorEffects.apply( rotaX );
174
      floorEffects.apply( rotaZ );
175 172
      floorEffects.apply( scale );
173
      floorEffects.apply( rotaZ );
174
      floorEffects.apply( rotaX );
175
      floorEffects.apply( move2 );
176 176
      /////////////////////////////////////////////////////////////////////////////////////////////////////
177 177
      // Reflection
178
      cube2Effects.apply( move2 );
179
      cube2Effects.apply( rotaX );
180
      cube2Effects.apply( rotaZ );
181
      cube2Effects.apply( scale );
182
      cube2Effects.apply( move1 );
183 178
      cube2Effects.apply( new MatrixEffectScale(new Static3D(1,1,-1)) );
179
      cube2Effects.apply( move1 );
180
      cube2Effects.apply( scale );
181
      cube2Effects.apply( rotaZ );
182
      cube2Effects.apply( rotaX );
183
      cube2Effects.apply( move2 );
184 184
      cube2Effects.apply( new FragmentEffectBrightness(new Static1D(0.5f)) );
185 185

  
186 186
      /////////////////////////////////////////////////////////////////////////////////////////////////////

Also available in: Unified diff