Revision babda153
Added by Leszek Koltunski over 7 years ago
src/main/java/org/distorted/examples/differenteffects/DifferentEffectsRenderer.java | ||
---|---|---|
137 | 137 |
int w = (height*bmpWidth)/bmpHeight; |
138 | 138 |
float factor = (float)height/bmpHeight; |
139 | 139 |
mScale.set(factor,factor,factor); |
140 |
|
|
141 |
for(int i=NUM-1; i>=0; i--) |
|
142 |
{ |
|
143 |
mMove[i].set((width-NUM*w)/2 +i*w , 0, 0); |
|
144 |
} |
|
145 |
|
|
140 |
for(int i=NUM-1; i>=0; i--) mMove[i].set((width-NUM*w)/2 +i*w , 0, 0); |
|
146 | 141 |
} |
147 | 142 |
else |
148 | 143 |
{ |
... | ... | |
150 | 145 |
int h = (width*bmpHeight)/(bmpWidth*NUM); |
151 | 146 |
float factor = (float)width/(bmpWidth*NUM); |
152 | 147 |
mScale.set(factor,factor,factor); |
153 |
|
|
154 |
for(int i=NUM-1; i>=0; i--) |
|
155 |
{ |
|
156 |
mMove[i].set(i*w, (height-h)/2, 0); |
|
157 |
} |
|
148 |
for(int i=NUM-1; i>=0; i--) mMove[i].set(i*w, (height-h)/2, 0); |
|
158 | 149 |
} |
159 | 150 |
|
160 | 151 |
mScreen.resize(width, height); |
src/main/java/org/distorted/examples/glow/GlowRenderer.java | ||
---|---|---|
69 | 69 |
mScale = new Static3D(1,1,1); |
70 | 70 |
mRadius= new Static1D(25); |
71 | 71 |
|
72 |
mColor = new Static4D(1.0f,1.0f,0.0f,0.5f); // half-transparent yellow
|
|
72 |
mColor = new Static4D(1.0f,0.0f,0.0f,0.5f); // half-transparent red
|
|
73 | 73 |
|
74 | 74 |
DistortedEffects effects = new DistortedEffects(); |
75 | 75 |
effects.apply(new MatrixEffectMove(mMove)); |
... | ... | |
78 | 78 |
|
79 | 79 |
mScreen = new DistortedScreen(); |
80 | 80 |
mScreen.attach(mLeaf, effects, new MeshFlat(1,1) ); |
81 |
mScreen.glClearColor(1.0f, 1.0f, 1.0f, 1.0f); |
|
81 | 82 |
} |
82 | 83 |
|
83 | 84 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
Also available in: Unified diff
Improve 'Glow' app.