Blockland Forums > General Discussion

Custom Shaders?

Pages: (1/2) > >>

The True Zephyr:

So, I had heard that we're able to package custom shaders and stuff. Is that true?

Deoxys And One Noob:

You mean, v21 is out?

LOL :D:


--- Quote from: Deoxys And One Noob on August 10, 2012, 09:19:01 AM ---You mean, v21 is out?

--- End quote ---
Check Development.

Sylvanor:


--- Quote from: Deoxys And One Noob on August 10, 2012, 09:19:01 AM ---You mean, v21 is out?

--- End quote ---

Your late...

Masterlegodude:

You can, if you know how

This is from one of the shader files in the shaders folder, you can open all of the new Blockland files with notepad

--- Code: ---/////////////////////////////////////////////////
// 7x1 gaussian blur fragment shader
/////////////////////////////////////////////////

//varying vec2 v_Coordinates;

uniform vec2 ScaleU;
uniform sampler2D textureSource;

void main()
{
   vec4 color = vec4(0.0);

   //color += texture2D( textureSource, gl_TexCoord[0].st + vec2( -3.0*ScaleU.x, -3.0*ScaleU.y ) ) * 0.015625;
   //color += texture2D( textureSource, gl_TexCoord[0].st + vec2( -2.0*ScaleU.x, -2.0*ScaleU.y ) ) * 0.09375;
   color += texture2D( textureSource, gl_TexCoord[0].st + vec2( -1.0*ScaleU.x, -1.0*ScaleU.y ) ) * 0.234375;
   color += texture2D( textureSource, gl_TexCoord[0].st + vec2( 0.0 , 0.0) ) * 0.3125;
   color += texture2D( textureSource, gl_TexCoord[0].st + vec2( 1.0*ScaleU.x,  1.0*ScaleU.y ) ) * 0.234375;
   //color += texture2D( textureSource, gl_TexCoord[0].st + vec2( 2.0*ScaleU.x,  2.0*ScaleU.y ) ) * 0.09375;
   //color += texture2D( textureSource, gl_TexCoord[0].st + vec2( 3.0*ScaleU.x, -3.0*ScaleU.y ) ) * 0.015625;     

   gl_FragColor = color / (0.234375 + 0.3125 + 0.234375);
}
--- End code ---


Pages: (1/2) > >>

Go to full version