adding test code to export fboRGB

This commit is contained in:
minjaesong
2019-01-15 03:02:40 +09:00
parent 8c4793bea5
commit 7cd2b55b97
8 changed files with 88 additions and 40 deletions

View File

@@ -30,7 +30,6 @@ uniform sampler2D tilemap; // RGBA8888
uniform sampler2D tilesAtlas; // terrain, wire, fluids, etc.
uniform sampler2D tilesBlendAtlas; // weather mix (e.g. yellowed grass)
uniform sampler2D backbuffer;
uniform float tilesBlend = 0.0; // percentage of blending [0f..1f]. 0: draws tilesAtlas, 1: draws tilesBlendAtlas
uniform ivec2 tilesInAtlas = ivec2(256, 256);
@@ -112,10 +111,7 @@ void main() {
vec4 finalBreakage = texture2D(tilesAtlas, finalUVCoordForBreakage);
vec4 finalColor = mix(finalTile, finalBreakage, finalBreakage.a);
vec4 backbufferColor = texture2D(backbuffer, gl_FragCoord.xy / screenDimension);
//gl_FragColor = colourFilter * finalColor;
// v
gl_FragColor = colourFilter * mix(backbufferColor, finalColor, 1);
gl_FragColor = colourFilter * finalColor;
}