Revision c90aca24
Added by Leszek Koltunski about 4 years ago
src/main/java/org/distorted/library/effectqueue/EffectQueuePostprocess.java | ||
---|---|---|
27 | 27 |
import org.distorted.library.effect.EffectType; |
28 | 28 |
import org.distorted.library.effect.PostprocessEffect; |
29 | 29 |
import org.distorted.library.effect.VertexEffect; |
30 |
import org.distorted.library.main.DistortedEffects; |
|
30 | 31 |
import org.distorted.library.main.DistortedLibrary; |
31 | 32 |
import org.distorted.library.main.DistortedFramebuffer; |
32 | 33 |
import org.distorted.library.main.DistortedNode; |
... | ... | |
164 | 165 |
if( input.setAsInput() ) |
165 | 166 |
{ |
166 | 167 |
MeshBase mesh = node.getMesh(); |
168 |
DistortedEffects effects = node.getEffects(); |
|
167 | 169 |
|
168 |
float halfW = input.getWidth() / 2.0f;
|
|
169 |
float halfH = input.getHeight()/ 2.0f;
|
|
170 |
float halfZ = halfW*mesh.getZFactor();
|
|
170 |
float halfW = effects.getStartchX() / 2.0f;
|
|
171 |
float halfH = effects.getStartchY() / 2.0f;
|
|
172 |
float halfZ = effects.getStartchZ() / 2.0f;
|
|
171 | 173 |
|
172 |
int width = buffer.getWidth(); |
|
173 |
int height = buffer.getHeight(); |
|
174 |
int width = buffer.getWidth();
|
|
175 |
int height = buffer.getHeight();
|
|
174 | 176 |
|
175 | 177 |
InternalRenderState.setUpStencilMark(mA!=0.0f); |
176 | 178 |
InternalRenderState.disableBlending(); |
... | ... | |
181 | 183 |
|
182 | 184 |
mesh.bindVertexAttribs(mPreProgram); |
183 | 185 |
|
184 |
EffectQueue[] queues = node.getEffects().getQueues();
|
|
186 |
EffectQueue[] queues = effects.getQueues();
|
|
185 | 187 |
EffectQueueMatrix matrix = (EffectQueueMatrix)queues[0]; |
186 | 188 |
EffectQueueVertex vertex = (EffectQueueVertex)queues[1]; |
187 | 189 |
|
Also available in: Unified diff
Move the 'pre-multiply mesh before applying any effects' thing from [(Xsize of texture, Ysize of texture) x Mesh's zFactor] to Effects.setStretch(sx,sy,sz)