Pipeline { info = "generated by lambdacube-compiler 0.6.0.0" , backend = OpenGL33 , textures = [ TextureDescriptor { textureType = Texture2D (FloatT Red) 1 , textureSize = VV2U (V2 512 512) , textureSemantic = Depth , textureSampler = SamplerDescriptor { samplerWrapS = Repeat , samplerWrapT = Nothing , samplerWrapR = Nothing , samplerMinFilter = Linear , samplerMagFilter = Linear , samplerBorderColor = VV4F (V4 0.0 0.0 0.0 1.0) , samplerMinLod = Nothing , samplerMaxLod = Nothing , samplerLodBias = 0.0 , samplerCompareFunc = Nothing } , textureBaseLevel = 0 , textureMaxLevel = 0 } , TextureDescriptor { textureType = Texture2D (FloatT RGBA) 1 , textureSize = VV2U (V2 512 512) , textureSemantic = Color , textureSampler = SamplerDescriptor { samplerWrapS = Repeat , samplerWrapT = Nothing , samplerWrapR = Nothing , samplerMinFilter = Linear , samplerMagFilter = Linear , samplerBorderColor = VV4F (V4 0.0 0.0 0.0 1.0) , samplerMinLod = Nothing , samplerMaxLod = Nothing , samplerLodBias = 0.0 , samplerCompareFunc = Nothing } , textureBaseLevel = 0 , textureMaxLevel = 0 } , TextureDescriptor { textureType = Texture2D (FloatT Red) 1 , textureSize = VV2U (V2 512 512) , textureSemantic = Depth , textureSampler = SamplerDescriptor { samplerWrapS = Repeat , samplerWrapT = Nothing , samplerWrapR = Nothing , samplerMinFilter = Linear , samplerMagFilter = Linear , samplerBorderColor = VV4F (V4 0.0 0.0 0.0 1.0) , samplerMinLod = Nothing , samplerMaxLod = Nothing , samplerLodBias = 0.0 , samplerCompareFunc = Nothing } , textureBaseLevel = 0 , textureMaxLevel = 0 } , TextureDescriptor { textureType = Texture2D (FloatT RGBA) 1 , textureSize = VV2U (V2 512 512) , textureSemantic = Color , textureSampler = SamplerDescriptor { samplerWrapS = Repeat , samplerWrapT = Nothing , samplerWrapR = Nothing , samplerMinFilter = Linear , samplerMagFilter = Linear , samplerBorderColor = VV4F (V4 0.0 0.0 0.0 1.0) , samplerMinLod = Nothing , samplerMaxLod = Nothing , samplerLodBias = 0.0 , samplerCompareFunc = Nothing } , textureBaseLevel = 0 , textureMaxLevel = 0 } ] , samplers = [] , targets = [ RenderTarget { renderTargets = [ TargetItem { targetSemantic = Depth , targetRef = Just (Framebuffer Depth) } , TargetItem { targetSemantic = Color , targetRef = Just (Framebuffer Color) } ] } , RenderTarget { renderTargets = [ TargetItem { targetSemantic = Depth , targetRef = Just (TextureImage 0 0 Nothing) } , TargetItem { targetSemantic = Color , targetRef = Just (TextureImage 1 0 Nothing) } ] } , RenderTarget { renderTargets = [ TargetItem { targetSemantic = Depth , targetRef = Just (TextureImage 2 0 Nothing) } , TargetItem { targetSemantic = Color , targetRef = Just (TextureImage 3 0 Nothing) } ] } ] , programs = [ Program { programUniforms = fromList [ ( "Time" , Float ) ] , programStreams = fromList [ ( "vi1" , Parameter { name = "position4" , ty = V4F } ) ] , programInTextures = fromList [] , programOutput = [ Parameter { name = "f0" , ty = V4F } ] , vertexShader = """ #version 330 core vec4 texture2D(sampler2D s ,vec2 uv) { return texture(s,uv); } uniform float Time; in vec4 vi1; smooth out vec4 vo1; vec4 r1_Float; vec4 r2_Float; vec4 r3_Float; vec4 ext0_Float_3(vec3 z0) { return vec4 ((z0).x ,(z0).y ,(z0).z ,0.0); } vec3 neg_VecSFloat3(vec3 z0) { return - (z0); } mat4 translateBefore4(vec3 z0) { return mat4 (r1_Float ,r2_Float ,r3_Float ,vec4 ((z0).x ,(z0).y ,(z0).z ,1.0)); } mat4 lookat(vec3 z0 ,vec3 z1 ,vec3 z2) { return (transpose (mat4 (ext0_Float_3 (normalize (cross (z2,normalize ((z0) - (z1))))) ,ext0_Float_3 (cross (normalize ((z0) - (z1)) ,normalize (cross (z2 ,normalize ((z0) - (z1)))))) ,ext0_Float_3 (normalize ((z0) - (z1))) ,vec4 (0.0 ,0.0 ,0.0 ,1.0)))) * (translateBefore4 (neg_VecSFloat3 (z0))); } mat4 perspective(float z0 ,float z1 ,float z2 ,float z3) { return mat4 (vec4 (((2.0) * (z0)) / (((z3) * ((z0) * (tan ((z2) / (2.0))))) - ((0.0) - ((z3) * ((z0) * (tan ((z2) / (2.0))))))) ,0.0 ,0.0 ,0.0) ,vec4 (0.0 ,((2.0) * (z0)) / (((z0) * (tan ((z2) / (2.0)))) - ((0.0) - ((z0) * (tan ((z2) / (2.0)))))) ,0.0 ,0.0) ,vec4 ((((z3) * ((z0) * (tan ((z2) / (2.0))))) + ((0.0) - ((z3) * ((z0) * (tan ((z2) / (2.0))))))) / (((z3) * ((z0) * (tan ((z2) / (2.0))))) - ((0.0) - ((z3) * ((z0) * (tan ((z2) / (2.0))))))) ,(((z0) * (tan ((z2) / (2.0)))) + ((0.0) - ((z0) * (tan ((z2) / (2.0)))))) / (((z0) * (tan ((z2) / (2.0)))) - ((0.0) - ((z0) * (tan ((z2) / (2.0)))))) ,(0.0) - (((z1) + (z0)) / ((z1) - (z0))) ,-1.0) ,vec4 (0.0 ,0.0 ,(0.0) - ((((2.0) * (z1)) * (z0)) / ((z1) - (z0))) ,0.0)); } mat4 rotMatrixY(float z0) { return mat4 (vec4 (cos (z0) ,0.0 ,(0.0) - (sin (z0)) ,0.0) ,vec4 (0.0,1.0,0.0,0.0) ,vec4 (sin (z0) ,0.0 ,cos (z0) ,0.0) ,vec4 (0.0,0.0,0.0,1.0)); } vec4 scale(float z0,vec4 z1) { return (z1) * (vec4 (z0 ,z0 ,z0 ,1.0)); } void main() { r1_Float = vec4 (1.0 ,0.0 ,0.0 ,0.0); r2_Float = vec4 (0.0 ,1.0 ,0.0 ,0.0); r3_Float = vec4 (0.0 ,0.0 ,1.0 ,0.0); gl_Position = scale (0.5 ,(((perspective (0.1 ,100.0 ,0.5235987755982988 ,1.0)) * (lookat (vec3 (3.0 ,1.3 ,0.3) ,vec3 (0.0,0.0,0.0) ,vec3 (0.0 ,1.0 ,0.0)))) * (rotMatrixY ((0.1308996938995747) * (Time)))) * (vi1)); vo1 = vi1; } """ , geometryShader = Nothing , fragmentShader = """ #version 330 core vec4 texture2D(sampler2D s ,vec2 uv) { return texture(s,uv); } uniform float Time; smooth in vec4 vo1; out vec4 f0; float len2_Float_4(vec4 z0) { return ((((z0).x) * ((z0).x)) + (((z0).y) * ((z0).y))) + (((z0).z) * ((z0).z)); } void main() { if (!(((((((vo1).y) + ((vo1).x)) + ((vo1).z)) > (1.0)) || ((abs (((((vo1).y) - ((vo1).x)) + ((vo1).z)) - (1.0))) > (0.25))) && (((((((vo1).y) + ((vo1).x)) - ((vo1).z)) > (1.0)) || ((abs (((((vo1).y) + ((vo1).x)) + ((vo1).z)) - (1.0))) > (0.25))) && (((((((vo1).y) - ((vo1).x)) - ((vo1).z)) > (1.0)) || ((abs (((((vo1).y) + ((vo1).x)) - ((vo1).z)) - (1.0))) > (0.25))) && (((((((vo1).y) - ((vo1).x)) + ((vo1).z)) > (1.0)) || ((abs (((((vo1).y) - ((vo1).x)) - ((vo1).z)) - (1.0))) > (0.25))) && ((len2_Float_4 (sin ((vo1) * (20.0)))) > (abs ((3.0) * (sin ((1.0) * (Time))))))))))) discard; f0 = vo1; } """ } , Program { programUniforms = fromList [ ( "Time" , Float ) ] , programStreams = fromList [ ( "vi1" , Parameter { name = "position4" , ty = V4F } ) , ( "vi2" , Parameter { name = "vertexUV" , ty = V2F } ) ] , programInTextures = fromList [ ( "s0" , FTexture2D ) ] , programOutput = [ Parameter { name = "f0" , ty = V4F } ] , vertexShader = """ #version 330 core vec4 texture2D(sampler2D s ,vec2 uv) { return texture(s,uv); } uniform float Time; in vec4 vi1; in vec2 vi2; smooth out vec2 vo1; vec4 r1_Float; vec4 r2_Float; vec4 r3_Float; vec4 ext0_Float_3(vec3 z0) { return vec4 ((z0).x ,(z0).y ,(z0).z ,0.0); } vec3 neg_VecSFloat3(vec3 z0) { return - (z0); } mat4 translateBefore4(vec3 z0) { return mat4 (r1_Float ,r2_Float ,r3_Float ,vec4 ((z0).x ,(z0).y ,(z0).z ,1.0)); } mat4 lookat(vec3 z0 ,vec3 z1 ,vec3 z2) { return (transpose (mat4 (ext0_Float_3 (normalize (cross (z2,normalize ((z0) - (z1))))) ,ext0_Float_3 (cross (normalize ((z0) - (z1)) ,normalize (cross (z2 ,normalize ((z0) - (z1)))))) ,ext0_Float_3 (normalize ((z0) - (z1))) ,vec4 (0.0 ,0.0 ,0.0 ,1.0)))) * (translateBefore4 (neg_VecSFloat3 (z0))); } mat4 perspective(float z0 ,float z1 ,float z2 ,float z3) { return mat4 (vec4 (((2.0) * (z0)) / (((z3) * ((z0) * (tan ((z2) / (2.0))))) - ((0.0) - ((z3) * ((z0) * (tan ((z2) / (2.0))))))) ,0.0 ,0.0 ,0.0) ,vec4 (0.0 ,((2.0) * (z0)) / (((z0) * (tan ((z2) / (2.0)))) - ((0.0) - ((z0) * (tan ((z2) / (2.0)))))) ,0.0 ,0.0) ,vec4 ((((z3) * ((z0) * (tan ((z2) / (2.0))))) + ((0.0) - ((z3) * ((z0) * (tan ((z2) / (2.0))))))) / (((z3) * ((z0) * (tan ((z2) / (2.0))))) - ((0.0) - ((z3) * ((z0) * (tan ((z2) / (2.0))))))) ,(((z0) * (tan ((z2) / (2.0)))) + ((0.0) - ((z0) * (tan ((z2) / (2.0)))))) / (((z0) * (tan ((z2) / (2.0)))) - ((0.0) - ((z0) * (tan ((z2) / (2.0)))))) ,(0.0) - (((z1) + (z0)) / ((z1) - (z0))) ,-1.0) ,vec4 (0.0 ,0.0 ,(0.0) - ((((2.0) * (z1)) * (z0)) / ((z1) - (z0))) ,0.0)); } mat4 rotMatrixY(float z0) { return mat4 (vec4 (cos (z0) ,0.0 ,(0.0) - (sin (z0)) ,0.0) ,vec4 (0.0,1.0,0.0,0.0) ,vec4 (sin (z0) ,0.0 ,cos (z0) ,0.0) ,vec4 (0.0,0.0,0.0,1.0)); } mat4 rotMatrix; mat4 rotMatrixX(float z0) { return mat4 (vec4 (1.0 ,0.0 ,0.0 ,0.0) ,vec4 (0.0 ,cos (z0) ,sin (z0) ,0.0) ,vec4 (0.0 ,(0.0) - (sin (z0)) ,cos (z0) ,0.0) ,vec4 (0.0,0.0,0.0,1.0)); } vec4 scale(float z0,vec4 z1) { return (z1) * (vec4 (z0 ,z0 ,z0 ,1.0)); } void main() { r1_Float = vec4 (1.0 ,0.0 ,0.0 ,0.0); r2_Float = vec4 (0.0 ,1.0 ,0.0 ,0.0); r3_Float = vec4 (0.0 ,0.0 ,1.0 ,0.0); rotMatrix = ((perspective (0.1 ,100.0 ,0.5235987755982988 ,1.0)) * (lookat (vec3 (3.0 ,1.3 ,0.3) ,vec3 (0.0,0.0,0.0) ,vec3 (0.0 ,1.0 ,0.0)))) * (rotMatrixY ((0.1308996938995747) * (Time))); gl_Position = (rotMatrix) * (scale (0.4 ,(rotMatrixX (0.0)) * (vi1))); vo1 = vi2; } """ , geometryShader = Nothing , fragmentShader = """ #version 330 core vec4 texture2D(sampler2D s ,vec2 uv) { return texture(s,uv); } uniform sampler2D s0; smooth in vec2 vo1; out vec4 f0; vec4 setAlpha(vec4 z0) { return ((z0) * (vec4 (1.0 ,1.0 ,1.0 ,0.0))) + (vec4 (0.0 ,0.0 ,0.0 ,1.0)); } void main() { f0 = setAlpha (((((vo1).yyyx) * (0.5)) + (texture2D (s0,vo1))) * (0.7)); } """ } , Program { programUniforms = fromList [ ( "Time" , Float ) ] , programStreams = fromList [ ( "vi1" , Parameter { name = "position4" , ty = V4F } ) , ( "vi2" , Parameter { name = "vertexUV" , ty = V2F } ) ] , programInTextures = fromList [ ( "s0" , FTexture2D ) ] , programOutput = [ Parameter { name = "f0" , ty = V4F } ] , vertexShader = """ #version 330 core vec4 texture2D(sampler2D s ,vec2 uv) { return texture(s,uv); } uniform float Time; in vec4 vi1; in vec2 vi2; smooth out vec2 vo1; vec4 r1_Float; vec4 r2_Float; vec4 r3_Float; vec4 ext0_Float_3(vec3 z0) { return vec4 ((z0).x ,(z0).y ,(z0).z ,0.0); } vec3 neg_VecSFloat3(vec3 z0) { return - (z0); } mat4 translateBefore4(vec3 z0) { return mat4 (r1_Float ,r2_Float ,r3_Float ,vec4 ((z0).x ,(z0).y ,(z0).z ,1.0)); } mat4 lookat(vec3 z0 ,vec3 z1 ,vec3 z2) { return (transpose (mat4 (ext0_Float_3 (normalize (cross (z2,normalize ((z0) - (z1))))) ,ext0_Float_3 (cross (normalize ((z0) - (z1)) ,normalize (cross (z2 ,normalize ((z0) - (z1)))))) ,ext0_Float_3 (normalize ((z0) - (z1))) ,vec4 (0.0 ,0.0 ,0.0 ,1.0)))) * (translateBefore4 (neg_VecSFloat3 (z0))); } mat4 perspective(float z0 ,float z1 ,float z2 ,float z3) { return mat4 (vec4 (((2.0) * (z0)) / (((z3) * ((z0) * (tan ((z2) / (2.0))))) - ((0.0) - ((z3) * ((z0) * (tan ((z2) / (2.0))))))) ,0.0 ,0.0 ,0.0) ,vec4 (0.0 ,((2.0) * (z0)) / (((z0) * (tan ((z2) / (2.0)))) - ((0.0) - ((z0) * (tan ((z2) / (2.0)))))) ,0.0 ,0.0) ,vec4 ((((z3) * ((z0) * (tan ((z2) / (2.0))))) + ((0.0) - ((z3) * ((z0) * (tan ((z2) / (2.0))))))) / (((z3) * ((z0) * (tan ((z2) / (2.0))))) - ((0.0) - ((z3) * ((z0) * (tan ((z2) / (2.0))))))) ,(((z0) * (tan ((z2) / (2.0)))) + ((0.0) - ((z0) * (tan ((z2) / (2.0)))))) / (((z0) * (tan ((z2) / (2.0)))) - ((0.0) - ((z0) * (tan ((z2) / (2.0)))))) ,(0.0) - (((z1) + (z0)) / ((z1) - (z0))) ,-1.0) ,vec4 (0.0 ,0.0 ,(0.0) - ((((2.0) * (z1)) * (z0)) / ((z1) - (z0))) ,0.0)); } mat4 rotMatrixY(float z0) { return mat4 (vec4 (cos (z0) ,0.0 ,(0.0) - (sin (z0)) ,0.0) ,vec4 (0.0,1.0,0.0,0.0) ,vec4 (sin (z0) ,0.0 ,cos (z0) ,0.0) ,vec4 (0.0,0.0,0.0,1.0)); } mat4 rotMatrix; mat4 rotMatrixX(float z0) { return mat4 (vec4 (1.0 ,0.0 ,0.0 ,0.0) ,vec4 (0.0 ,cos (z0) ,sin (z0) ,0.0) ,vec4 (0.0 ,(0.0) - (sin (z0)) ,cos (z0) ,0.0) ,vec4 (0.0,0.0,0.0,1.0)); } vec4 scale(float z0,vec4 z1) { return (z1) * (vec4 (z0 ,z0 ,z0 ,1.0)); } void main() { r1_Float = vec4 (1.0 ,0.0 ,0.0 ,0.0); r2_Float = vec4 (0.0 ,1.0 ,0.0 ,0.0); r3_Float = vec4 (0.0 ,0.0 ,1.0 ,0.0); rotMatrix = ((perspective (0.1 ,100.0 ,0.5235987755982988 ,1.0)) * (lookat (vec3 (3.0 ,1.3 ,0.3) ,vec3 (0.0,0.0,0.0) ,vec3 (0.0 ,1.0 ,0.0)))) * (rotMatrixY ((0.1308996938995747) * (Time))); gl_Position = (rotMatrix) * (scale (0.4 ,(rotMatrixX (0.1)) * (vi1))); vo1 = vi2; } """ , geometryShader = Nothing , fragmentShader = """ #version 330 core vec4 texture2D(sampler2D s ,vec2 uv) { return texture(s,uv); } uniform sampler2D s0; smooth in vec2 vo1; out vec4 f0; vec4 setAlpha(vec4 z0) { return ((z0) * (vec4 (1.0 ,1.0 ,1.0 ,0.0))) + (vec4 (0.0 ,0.0 ,0.0 ,1.0)); } void main() { f0 = setAlpha (((((vo1).yyyx) * (0.5)) + (texture2D (s0,vo1))) * (0.7)); } """ } ] , slots = [ Slot { slotName = "stream4" , slotStreams = fromList [ ( "position4" , V4F ) , ( "vertexUV" , V2F ) ] , slotUniforms = fromList [ ( "Time" , Float ) ] , slotPrimitive = Triangles , slotPrograms = [ 0 , 1 , 2 ] } ] , streams = [] , commands = [ SetRenderTarget 2 , ClearRenderTarget [ ClearImage { imageSemantic = Depth , clearValue = VFloat 1.0 } , ClearImage { imageSemantic = Color , clearValue = VV4F (V4 0.0 0.0 0.5 1.0) } ] , SetProgram 0 , SetRasterContext (TriangleCtx CullNone PolygonFill NoOffset LastVertex) , SetAccumulationContext AccumulationContext { accViewportName = Nothing , accOperations = [ DepthOp Less True , ColorOp NoBlending (VV4B (V4 True True True True)) ] } , RenderSlot 0 , SetRenderTarget 1 , ClearRenderTarget [ ClearImage { imageSemantic = Depth , clearValue = VFloat 1.0 } , ClearImage { imageSemantic = Color , clearValue = VV4F (V4 0.0 0.5 0.5 1.0) } ] , SetProgram 1 , SetTexture 0 3 , SetSamplerUniform "s0" 0 , SetRasterContext (TriangleCtx CullNone PolygonFill NoOffset LastVertex) , SetAccumulationContext AccumulationContext { accViewportName = Nothing , accOperations = [ DepthOp Less True , ColorOp NoBlending (VV4B (V4 True True True True)) ] } , RenderSlot 0 , SetRenderTarget 0 , ClearRenderTarget [ ClearImage { imageSemantic = Depth , clearValue = VFloat 1.0 } , ClearImage { imageSemantic = Color , clearValue = VV4F (V4 0.0 0.5 0.5 1.0) } ] , SetProgram 2 , SetTexture 0 1 , SetSamplerUniform "s0" 0 , SetRasterContext (TriangleCtx CullNone PolygonFill NoOffset LastVertex) , SetAccumulationContext AccumulationContext { accViewportName = Nothing , accOperations = [ DepthOp Less True , ColorOp NoBlending (VV4B (V4 True True True True)) ] } , RenderSlot 0 ] }