0% found this document useful (0 votes)
86 views4 pages

0a8c9efdfa4357dfdff72dc9b262d863

This document contains the source code for a compiled shader program with the following key details: - It has vertex and fragment shader source code formatted for OpenGL ES 3.0. - The shaders reference 12 input blocks that define the shader's functionality. - The vertex shader transforms vertices, calculates normals, texture coordinates, and outputs values to the fragment shader. - The fragment shader performs lighting calculations combining texture lookups, normal data, and light map sampling to calculate the final color output.

Uploaded by

Christo Prabudhi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
86 views4 pages

0a8c9efdfa4357dfdff72dc9b262d863

This document contains the source code for a compiled shader program with the following key details: - It has vertex and fragment shader source code formatted for OpenGL ES 3.0. - The shaders reference 12 input blocks that define the shader's functionality. - The vertex shader transforms vertices, calculates normals, texture coordinates, and outputs values to the fragment shader. - The fragment shader performs lighting calculations combining texture lookups, normal data, and light map sampling to calculate the final color output.

Uploaded by

Christo Prabudhi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 4

CompiledProgram (0a8c9efdfa4357dfdff72dc9b262d863)

Input Blocks:
- vertexBlockUber - GetAnimatedUVCoords - GetEmissiveAndTintingFromVertexColor -
light_sh_0 - TangentSpaceNormalToViewAndWorldSpace - SimpleAlphaTested -
RuntimeTinting - IllumLambert - LightAtlas - light-dir-0
Vertex Shader Source:
#version 300 es

//////////////////////////////////////////////
// Osiris CL-16, shadercore: 2.5
// ------------------------------------
// block: vertexBlockUber
// block: GetAnimatedUVCoords
// block: GetEmissiveAndTintingFromVertexColor
// block: light_sh_0
// block: TangentSpaceNormalToViewAndWorldSpace
// block: SimpleAlphaTested
// block: RuntimeTinting
// block: IllumLambert
// block: LightAtlas
// block: light-dir-0
//
//////////////////////////////////////////////

precision highp float;


precision highp int;

// Attributes
//==========================
in vec4 a_Position0;
in vec3 a_Normal0;
in vec2 a_TexCoord0;

// Uniforms
//==========================

// Uniforms
//==========================
uniform highp mat4 sys_Model;
uniform highp mat4 sys_ModelViewProjection;
uniform highp mat4 sys_InverseView;
uniform highp mat3 sys_InverseModelT;
uniform highp mat3 sys_InverseModelViewT;
uniform highp float sys_Time;

uniform highp vec4 gSpecialControl_VS;

uniform highp vec4 aux_ScaleBias[4];

// Varyings
//==========================
out mediump vec4 v_Varying6;
out highp vec3 v_Varying5;
out highp vec3 v_Varying1;
out mediump vec3 v_Varying4;
out highp vec3 v_Varying2;
out highp vec3 v_Varying3;
out highp vec2 v_Varying0;
//==========================================
// Vertex Shader
//==========================================
void main()
{
vec3 tmp0 = normalize(sys_InverseModelViewT * a_Normal0);
vec3 tmp1 = normalize(sys_InverseModelT * a_Normal0);
mat3 tmp3 = mat3(sys_InverseView);
vec3 tmp2 = tmp3 * normalize(tmp0);
vec3 tmp6 = aux_ScaleBias[uint(0)].xyz * a_Position0.xyz;
vec3 tmp5 = tmp6 + aux_ScaleBias[uint(1)].xyz;
vec4 tmp4 = sys_Model * vec4(tmp5, 1.0);
vec2 tmp8 = vec2(sys_Time, sys_Time) * gSpecialControl_VS.xy;
vec2 tmp7 = aux_ScaleBias[uint(2)].xy
* a_TexCoord0 + aux_ScaleBias[uint(3)].xy + tmp8;

// Varyings
v_Varying6 = vec4(0.0, 0.0, 0.0, 1.0);
v_Varying5 = tmp0;
v_Varying1 = tmp1;
v_Varying4 = vec3(1.0, 1.0, 1.0);
v_Varying2 = tmp2;
v_Varying3 = tmp4.xyz;
v_Varying0 = tmp7;

// Outputs
gl_Position = sys_ModelViewProjection * vec4(tmp5, 1.0);
}

Fragment Shader Source:


#version 300 es

//////////////////////////////////////////////
// Osiris CL-16, shadercore: 2.5
// ------------------------------------
// block: vertexBlockUber
// block: GetAnimatedUVCoords
// block: GetEmissiveAndTintingFromVertexColor
// block: light_sh_0
// block: TangentSpaceNormalToViewAndWorldSpace
// block: SimpleAlphaTested
// block: RuntimeTinting
// block: IllumLambert
// block: LightAtlas
// block: light-dir-0
//
//////////////////////////////////////////////

precision mediump float;

precision mediump sampler2DShadow;


out mediump vec4 frag_color0;

// Uniforms
//==========================

// Uniforms
//==========================
uniform highp vec4 sys_LightColor[4];
uniform highp vec4 sys_LightDirection[4];
uniform highp vec4 sys_LightSH0[7];

uniform lowp sampler2D gBaseTexture_FS;

uniform highp vec4 gRuntimeTint;


uniform highp vec3 gFloorPosition_FS;
uniform highp vec3 gSurfaceNormal_FS;
uniform highp vec3 gSurfacePosition_FS;
uniform highp vec2 gSurfaceSize_FS;
uniform highp float gAlphaTest_FS;
uniform highp float gObjectLightIntensityScale;
uniform lowp sampler2D gLightAtlasTextureMultistory_FS;
uniform lowp sampler2D gLightAtlasTextureOne_FS;
uniform lowp sampler2D gMaskTexture_FS;

// Varyings
//==========================
in mediump vec4 v_Varying6;
in highp vec3 v_Varying5;
in highp vec3 v_Varying1;
in mediump vec3 v_Varying4;
in highp vec3 v_Varying2;
in highp vec3 v_Varying3;
in highp vec2 v_Varying0;

//==========================================
// Pixel Shader Main
//==========================================
void main()
{
highp float tmp0 = texture(gMaskTexture_FS, v_Varying0).y;
if (tmp0 < gAlphaTest_FS)
{
discard;
}
highp vec4 tmp1 = v_Varying1.yzzx * v_Varying1.xyzz;
highp vec3 tmp2 = vec3(dot(sys_LightSH0[3], tmp1), dot(sys_LightSH0[4], tmp1),
dot(sys_LightSH0[5], tmp1));
highp float tmp4 = max(dot(gSurfaceNormal_FS, v_Varying2), 0.75);
highp float tmp6 = v_Varying3.y - gSurfacePosition_FS.y;
highp float tmp7 = gFloorPosition_FS.y - gSurfacePosition_FS.y;
highp float tmp5 = clamp(2.0 * (1.0
- tmp6 / tmp7) * sign(tmp7 - 1.0), 0.0, 1.0);
highp float tmp3 = mix(tmp4, 0.0, tmp5);
highp float tmp13 = v_Varying3.x - gSurfacePosition_FS.x;
highp float tmp12 = tmp13 / gSurfaceSize_FS.x;
highp float tmp16 = v_Varying3.z - gSurfacePosition_FS.z;
highp float tmp15 = tmp16 / gSurfaceSize_FS.x;
highp float tmp17 = abs(gSurfaceNormal_FS.x);
highp float tmp14 = mix(tmp12, tmp15, tmp17);
highp float tmp18 = 1.0 - gSurfaceNormal_FS.y;
highp float tmp11 = mix(tmp12, tmp14, tmp18);
highp float tmp10 = clamp(tmp11, 0.0, 1.0);
highp float tmp21 = tmp16 / gSurfaceSize_FS.y;
highp float tmp22 = tmp6 / gSurfaceSize_FS.y;
highp float tmp20 = mix(tmp21, tmp22, tmp18);
highp float tmp19 = clamp(tmp20, 0.0, 1.0);
highp vec2 tmp9 = vec2(tmp10, tmp19);
highp vec4 tmp8 = texture(gLightAtlasTextureMultistory_FS, tmp9);
highp float tmp23 = mix(0.0, tmp4, tmp5);
highp vec4 tmp24 = texture(gLightAtlasTextureOne_FS, tmp9);
highp vec3 tmp25 = (vec4(gObjectLightIntensityScale,
gObjectLightIntensityScale, gObjectLightIntensityScale, gObjectLightIntensityScale)
* (vec4(1.5, 1.5, 1.5, 1.5) * vec4(tmp3, tmp3, tmp3, tmp3) * tmp8
+ vec4(1.5, 1.5, 1.5, 1.5) * vec4(tmp23, tmp23, tmp23, tmp23) * tmp24)).xyz;
vec4 tmp28 = texture(gBaseTexture_FS, v_Varying0);
highp vec3 tmp27 = v_Varying4 * tmp28.xyz * gRuntimeTint.xyz;
highp vec3 tmp26 = tmp27 * tmp27;
highp vec3 tmp29 = clamp(dot(-(sys_LightDirection[0].xyz),
normalize(normalize(v_Varying5))), 0.0, 1.0)
* sys_LightColor[0].xyz;
highp vec4 tmp30 = v_Varying6;
highp float tmp32 = tmp28.w * gRuntimeTint.w;

// Outputs
frag_color0 = vec4(sqrt(((vec3(dot(sys_LightSH0[0], vec4(v_Varying1, 1.0)),
dot(sys_LightSH0[1], vec4(v_Varying1, 1.0)), dot(sys_LightSH0[2], vec4(v_Varying1,
1.0)))
+ tmp2 + (v_Varying1.x * v_Varying1.x - v_Varying1.y * v_Varying1.y)
* sys_LightSH0[6].xyz + tmp25) * tmp26
+ tmp26 * tmp29) * tmp30.w + tmp26 * tmp30.xyz), tmp32);
}

You might also like