@@ -19,7 +19,7 @@ export const frontLight_fragment:GLSLChunk = {top: "",define: "",varDeclare: "",
1919export const frontLight_setWorldPosition_vertex :GLSLChunk = { top : "" , define : "" , varDeclare : "" , funcDeclare : "" , funcDefine : "" , body : "v_worldPosition = vec3(mMatrix * vec4(a_position, 1.0));\n" } ;
2020export const frontLight_vertex :GLSLChunk = { top : "" , define : "" , varDeclare : "" , funcDeclare : "" , funcDefine : "" , body : "gl_Position = u_pMatrix * u_vMatrix * vec4(v_worldPosition, 1.0);\n" } ;
2121export const webgl1_normalMatrix_noInstance_vertex :GLSLChunk = { top : "" , define : "" , varDeclare : "" , funcDeclare : "" , funcDefine : "" , body : "mat3 normalMatrix = u_normalMatrix;\n" } ;
22- export const webgl1_basic_map_fragment :GLSLChunk = { top : "" , define : "" , varDeclare : "varying vec2 v_mapCoord0;\n" , funcDeclare : "" , funcDefine : "" , body : "totalColor *= texture2D(u_sampler2D0 , v_mapCoord0);\n" } ;
22+ export const webgl1_basic_map_fragment :GLSLChunk = { top : "" , define : "" , varDeclare : "varying vec2 v_mapCoord0;\n" , funcDeclare : "" , funcDefine : "" , body : "totalColor *= texture2D(u_sampler2D , v_mapCoord0);\n" } ;
2323export const webgl1_basic_map_vertex :GLSLChunk = { top : "" , define : "" , varDeclare : "varying vec2 v_mapCoord0;\n" , funcDeclare : "" , funcDefine : "" , body : "// vec2 sourceTexCoord0 = a_texCoord * u_map0SourceRegion.zw + u_map0SourceRegion.xy;\n//\n// v_mapCoord0 = sourceTexCoord0 * u_map0RepeatRegion.zw + u_map0RepeatRegion.xy;\n\n v_mapCoord0 = a_texCoord;\n" } ;
2424export const webgl1_diffuseMap_fragment :GLSLChunk = { top : "" , define : "" , varDeclare : "varying vec2 v_diffuseMapTexCoord;\n" , funcDeclare : "" , funcDefine : "vec3 getMaterialDiffuse() {\n return texture2D(u_diffuseMapSampler, v_diffuseMapTexCoord).rgb;\n }\n" , body : "" } ;
2525export const webgl1_diffuseMap_vertex :GLSLChunk = { top : "" , define : "" , varDeclare : "varying vec2 v_diffuseMapTexCoord;\n" , funcDeclare : "" , funcDefine : "" , body : "//todo optimize(combine, reduce compute numbers)\n //todo BasicTexture extract textureMatrix\n// vec2 sourceTexCoord = a_texCoord * u_diffuseMapSourceRegion.zw + u_diffuseMapSourceRegion.xy;\n// v_diffuseMapTexCoord = sourceTexCoord * u_diffuseMapRepeatRegion.zw + u_diffuseMapRepeatRegion.xy;\n\n v_diffuseMapTexCoord = a_texCoord;\n" } ;
@@ -44,7 +44,7 @@ export const webgl2_common_fragment:GLSLChunk = {top: "",define: "",varDeclare:
4444export const webgl2_common_function :GLSLChunk = { top : "" , define : "" , varDeclare : "" , funcDeclare : "" , funcDefine : "" , body : "" } ;
4545export const webgl2_common_vertex :GLSLChunk = { top : "" , define : "" , varDeclare : "" , funcDeclare : "" , funcDefine : "" , body : "" } ;
4646export const ubo_light :GLSLChunk = { top : "" , define : "" , varDeclare : "layout(std140) uniform LightUbo {\n/*! vec4(lightModel, 0.0, 0.0, 0.0) */\n vec4 lightModel;\n} lightUbo;\n" , funcDeclare : "" , funcDefine : "" , body : "" } ;
47- export const webgl2_basic_map_fragment :GLSLChunk = { top : "" , define : "" , varDeclare : "in vec2 v_mapCoord0;\n" , funcDeclare : "" , funcDefine : "" , body : "totalColor *= texture(u_sampler2D0 , v_mapCoord0);\n" } ;
47+ export const webgl2_basic_map_fragment :GLSLChunk = { top : "" , define : "" , varDeclare : "in vec2 v_mapCoord0;\n" , funcDeclare : "" , funcDefine : "" , body : "totalColor *= texture(u_sampler2D , v_mapCoord0);\n" } ;
4848export const webgl2_basic_map_vertex :GLSLChunk = { top : "" , define : "" , varDeclare : "out vec2 v_mapCoord0;\n" , funcDeclare : "" , funcDefine : "" , body : "// vec2 sourceTexCoord0 = a_texCoord * u_map0SourceRegion.zw + u_map0SourceRegion.xy;\n//\n// v_mapCoord0 = sourceTexCoord0 * u_map0RepeatRegion.zw + u_map0RepeatRegion.xy;\n\n v_mapCoord0 = a_texCoord;\n" } ;
4949export const gbuffer_common_fragment :GLSLChunk = { top : "" , define : "" , varDeclare : "in vec3 v_worldPosition;\n" , funcDeclare : "" , funcDefine : "" , body : "" } ;
5050export const gbuffer_common_vertex :GLSLChunk = { top : "" , define : "" , varDeclare : "out vec3 v_worldPosition;\n" , funcDeclare : "" , funcDefine : "" , body : "" } ;
0 commit comments