{ "QEP": { "QQEM": "0.43", "connections": [ { "fromId": 0, "toId": 2 }, { "fromId": 2, "toId": 1 } ], "exportDirectory": ".", "exportFlags": 11, "exportName": "WallEffect1", "nodes": [ { "fragmentCode": [ "void main() {", " @nodes", " fragColor = fragColor * qt_Opacity;", "}" ], "name": "Main", "nodeId": 0, "type": 0, "vertexCode": [ "void main() {", " texCoord = qt_MultiTexCoord0;", " fragCoord = qt_Vertex.xy;", " vec2 vertCoord = qt_Vertex.xy;", " @nodes", " gl_Position = qt_Matrix * vec4(vertCoord, 0.0, 1.0);", "}" ], "x": 140, "y": 35.25 }, { "name": "Output", "nodeId": 1, "type": 1, "x": 140, "y": 589.75 }, { "description": "Draws animated sky by rendering tiled clouds texture with a perspective", "fragmentCode": [ "@main", "{", " vec4 texclouds = texture(cloudsTexture, fract(tc));", " texclouds.r = smoothstep(thresholds.s, thresholds.t, texclouds.r) * cloudsBrightness;", " texclouds = mix(cloudsSkyColor, cloudsColor, texclouds.r);", " texclouds = mix(cloudsHorizonColor, texclouds, glowFactor);", "", " fragColor = texclouds;", "}" ], "name": "Clouds", "nodeId": 2, "properties": [ { "defaultValue": "clouds.png", "description": "Repeating couds texture. The default image is 512x512 pixels and created using the GIMP tool by the following steps:\n1. Filters -> Render -> Noise -> Difference Clouds\n2. Filters -> Map -> Tile Seamless\n\nThe effect only uses the r channel of the texture.", "name": "cloudsTexture", "type": "image", "value": "fog.png" }, { "defaultValue": "0.8", "description": "This property defines the perspective for the clouds which makes the horizon appear further away. ", "maxValue": "1", "minValue": "0", "name": "cloudsPerspective", "type": "float", "value": "0.8" }, { "defaultValue": "1", "description": "Amount of texture scale horizontally.", "maxValue": "3", "minValue": "0", "name": "cloudsXScale", "type": "float", "value": "0.8" }, { "defaultValue": "1", "description": "Amount of texture scale vertically.", "maxValue": "3", "minValue": "0", "name": "cloudsYScale", "type": "float", "value": "1" }, { "defaultValue": "1, 0.4, 0.2, 1", "description": "Color fading used in clouds horizon.", "name": "cloudsHorizonColor", "type": "color", "value": "1, 0.414, 0, 1" }, { "defaultValue": "0.5", "description": "The size of cloud horizon glow.", "maxValue": "1", "minValue": "0", "name": "cloudsHorizonGlowSize", "type": "float", "value": "0.637534" }, { "defaultValue": "1, 1, 1, 1", "description": "The color for clouds.", "name": "cloudsColor", "type": "color", "value": "1, 1, 1, 1" }, { "defaultValue": "0.2, 0.4, 0.8, 1", "description": "The base color of sky behind the clouds.", "name": "cloudsSkyColor", "type": "color", "value": "0.2, 0.4, 0.8, 1" }, { "defaultValue": "0.5", "description": "This property adjusts the thickness/amount of the clouds", "maxValue": "1", "minValue": "0", "name": "cloudsThickness", "type": "float", "value": "0.5" }, { "defaultValue": "1", "description": "This property adjusts the brightness of the clouds", "maxValue": "3", "minValue": "0", "name": "cloudsBrightness", "type": "float", "value": "1.2" }, { "defaultValue": "0.2", "description": "This property defines how sharp or smooth the edges of the clouds are.", "maxValue": "1", "minValue": "0", "name": "cloudsSharpness", "type": "float", "value": "0.2" }, { "defaultValue": "0", "description": "This property affects the angle of the movement of the clouds if iTime is animated. This is a helper property that results in correctly calculated cloudsXSpeed and cloudsYSpeed values. The angle is in degrees and 0 is vertically aligned movement from bottom to top.", "maxValue": "360", "minValue": "0", "name": "cloudsMovementAngle", "type": "float", "value": "0" }, { "defaultValue": "0.2", "maxValue": "1", "minValue": "0", "name": "cloudsSpeed", "type": "float", "value": "0.05" }, { "customValue": "Math.sin(cloudsMovementAngle / 180 * Math.PI) * cloudsSpeed", "defaultValue": "0", "maxValue": "1", "minValue": "0", "name": "cloudsXSpeed", "type": "float", "useCustomValue": true, "value": "0" }, { "customValue": "Math.cos(cloudsMovementAngle / 180 * Math.PI) * cloudsSpeed", "defaultValue": "0", "maxValue": "1", "minValue": "0", "name": "cloudsYSpeed", "type": "float", "useCustomValue": true, "value": "0" } ], "type": 2, "vertexCode": [ "@mesh 20,20", "", "out float glowFactor;", "out float z;", "out vec2 tc;", "out vec2 thresholds;", "", "@main", "{", " const float invY = 1. - texCoord.y;", " z = 1. / (1. - cloudsPerspective + cloudsPerspective * invY);", "", " tc = texCoord;", "", " tc.x -= 0.5;", " tc.x *= z * cloudsXScale;", " tc.y -= 0.5;", " tc.y *= z * cloudsYScale;", "", " tc.x += iTime * cloudsXSpeed;", " tc.y += iTime * cloudsYSpeed;", "", " thresholds.s = 1. - cloudsThickness;", " const float d = (1. - thresholds.s) * (5. - 5 * cloudsSharpness);", " thresholds.s -= cloudsThickness * d;", " thresholds.t = thresholds.s + d;", "", " glowFactor = min(1., invY+ 1. - cloudsHorizonGlowSize);", "}" ], "x": 105, "y": 327.5 } ], "version": 1 } }