Revision f2367b75
Added by Leszek Koltunski about 7 years ago
src/main/java/org/distorted/library/DistortedFramebuffer.java | ||
---|---|---|
171 | 171 |
super(width,height,NOT_CREATED_YET, (depthEnabled ? NOT_CREATED_YET:DONT_CREATE),NOT_CREATED_YET, type); |
172 | 172 |
} |
173 | 173 |
|
174 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
175 |
// For setting the Depth texture as input to fragment shaders that merge many planes. (currently: blur2) |
|
176 |
|
|
177 |
boolean setAsDepth() |
|
178 |
{ |
|
179 |
if( mDepthH[0]>0 ) |
|
180 |
{ |
|
181 |
GLES30.glActiveTexture(GLES30.GL_TEXTURE1); |
|
182 |
GLES30.glBindTexture(GLES30.GL_TEXTURE_2D, mDepthH[0]); |
|
183 |
return true; |
|
184 |
} |
|
185 |
|
|
186 |
return false; |
|
187 |
} |
|
188 |
|
|
174 | 189 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
175 | 190 |
// PUBLIC API |
176 | 191 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
211 | 226 |
{ |
212 | 227 |
if( mColorH[0]>0 ) |
213 | 228 |
{ |
229 |
GLES30.glActiveTexture(GLES30.GL_TEXTURE0); |
|
214 | 230 |
GLES30.glBindTexture(GLES30.GL_TEXTURE_2D, mColorH[0]); |
215 | 231 |
return true; |
216 | 232 |
} |
Also available in: Unified diff
Upgrade from GLSL 1.00 to GLSL 3.00 ES
Introduce separate BLUR1 and BLUR2 shaders, the second one marging (writing to gl_FragDepth still does not work)