It looks like you're new here. If you want to get involved, click one of these buttons!
spriteFog = {} spriteFog.VS_GL = [[ uniform highp mat4 vMatrix; attribute highp vec3 vVertex; attribute mediump vec2 vTexCoord; varying mediump vec2 fTexCoord; void main() { vec4 vertex = vec4(vVertex, 1.0); gl_Position = vMatrix*vertex; fTexCoord = vTexCoord; } ]] spriteFog.FS_GL = [[ #ifdef GL_ES precision highp float; #endif const float offseta = 0.010; uniform lowp float pX; uniform lowp float pY; uniform lowp vec4 fColor; uniform mediump vec4 fTexSize; uniform lowp sampler2D fTexture; varying mediump vec2 fTexCoord; void main() { gl_FragColor = vec4(0, 0, 0, 1); } ]] spriteFog.Shader=Shader.new(spriteFog.VS_GL,spriteFog.FS_GL,Shader.FLAG_FROM_CODE, { {name="vMatrix",type=Shader.CMATRIX,sys=Shader.SYS_WORLD,vertex=true}, {name="fColor",type=Shader.CFLOAT4,sys=Shader.SYS_COLOR,vertex=false}, {name="fTexture",type=Shader.CTEXTURE,vertex=false}, {name="pX",type=Shader.CFLOAT,vertex=false}, {name="pY",type=Shader.CFLOAT,vertex=false} }, { {name="vVertex",type=Shader.DFLOAT,mult=3,slot=0,offset=0}, {name="vColor",type=Shader.DUBYTE,mult=4,slot=1,offset=0}, {name="vTexCoord",type=Shader.DFLOAT,mult=2,slot=2,offset=0}, }); |
Comments
Or you need something else?)