GamesData/GameUploadDocuments/3.GoalRush/Build/SDK_COCOS/GoalRushPro/library/59/5967a800-25ad-4c00-9872-5c4ba7840d17.json

1258 lines
124 KiB
JSON
Raw Normal View History

2025-07-03 12:53:49 +04:00
{
"__type__": "cc.EffectAsset",
"_name": "internal/editor/light-probe-visualization",
"_objFlags": 0,
"_native": "",
"techniques": [
{
"passes": [
{
"rasterizerState": {
"cullMode": 0
},
"blendState": {
"targets": [
{
"blend": true,
"blendSrc": 2,
"blendDst": 4,
"blendDstAlpha": 4
}
]
},
"program": "internal/editor/light-probe-visualization|gizmo-vs:vert|gizmo-fs:front",
"priority": 245,
"depthStencilState": {
"depthTest": false,
"depthWrite": false
}
},
{
"rasterizerState": {
"cullMode": 0
},
"blendState": {
"targets": [
{
"blend": true,
"blendSrc": 2,
"blendDst": 4,
"blendDstAlpha": 4
}
]
},
"program": "internal/editor/light-probe-visualization|gizmo-vs:vert|gizmo-fs:back",
"priority": 245,
"depthStencilState": {
"depthTest": false,
"depthWrite": false
}
}
]
}
],
"shaders": [
{
"blocks": [
{
"name": "Constant",
"members": [
{
"name": "mainColor",
"type": 16,
"count": 1
},
{
"name": "cc_sh_linear_const_r",
"type": 16,
"count": 1
},
{
"name": "cc_sh_linear_const_g",
"type": 16,
"count": 1
},
{
"name": "cc_sh_linear_const_b",
"type": 16,
"count": 1
},
{
"name": "cc_sh_quadratic_r",
"type": 16,
"count": 1
},
{
"name": "cc_sh_quadratic_g",
"type": 16,
"count": 1
},
{
"name": "cc_sh_quadratic_b",
"type": 16,
"count": 1
},
{
"name": "cc_sh_quadratic_a",
"type": 16,
"count": 1
}
],
"defines": [],
"stageFlags": 16,
"binding": 0
}
],
"samplerTextures": [],
"samplers": [],
"textures": [],
"buffers": [],
"images": [],
"subpassInputs": [],
"attributes": [
{
"name": "a_position",
"defines": [],
"format": 32,
"location": 0
},
{
"name": "a_normal",
"defines": [],
"format": 32,
"location": 1
}
],
"varyings": [
{
"name": "normal_w",
"type": 15,
"count": 1,
"defines": [],
"stageFlags": 17,
"location": 0
},
{
"name": "pos_w",
"type": 15,
"count": 1,
"defines": [],
"stageFlags": 17,
"location": 1
},
{
"name": "pos_l",
"type": 15,
"count": 1,
"defines": [],
"stageFlags": 17,
"location": 2
},
{
"name": "right",
"type": 15,
"count": 1,
"defines": [],
"stageFlags": 17,
"location": 3
},
{
"name": "up",
"type": 15,
"count": 1,
"defines": [],
"stageFlags": 17,
"location": 4
},
{
"name": "forward",
"type": 15,
"count": 1,
"defines": [],
"stageFlags": 17,
"location": 5
}
],
"fragColors": [
{
"name": "cc_FragColor",
"typename": "vec4",
"type": 16,
"count": 1,
"defines": [],
"stageFlags": 16,
"location": 0
}
],
"descriptors": [
{
"rate": 0,
"blocks": [
{
"tags": {
"builtin": "local"
},
"name": "CCLocal",
"members": [
{
"name": "cc_matWorld",
"typename": "mat4",
"type": 25,
"count": 1,
"precision": "highp "
},
{
"name": "cc_matWorldIT",
"typename": "mat4",
"type": 25,
"count": 1,
"precision": "highp "
},
{
"name": "cc_lightingMapUVParam",
"typename": "vec4",
"type": 16,
"count": 1,
"precision": "highp "
},
{
"name": "cc_localShadowBias",
"typename": "vec4",
"type": 16,
"count": 1,
"precision": "highp "
},
{
"name": "cc_reflectionProbeData1",
"typename": "vec4",
"type": 16,
"count": 1,
"precision": "highp "
},
{
"name": "cc_reflectionProbeData2",
"typename": "vec4",
"type": 16,
"count": 1,
"precision": "highp "
}
],
"defines": [],
"stageFlags": 1
}
],
"samplerTextures": [],
"samplers": [],
"textures": [],
"buffers": [],
"images": [],
"subpassInputs": []
},
{
"rate": 1,
"blocks": [
{
"name": "Constant",
"members": [
{
"name": "mainColor",
"type": 16,
"count": 1
},
{
"name": "cc_sh_linear_const_r",
"type": 16,
"count": 1
},
{
"name": "cc_sh_linear_const_g",
"type": 16,
"count": 1
},
{
"name": "cc_sh_linear_const_b",
"type": 16,
"count": 1
},
{
"name": "cc_sh_quadratic_r",
"type": 16,
"count": 1
},
{
"name": "cc_sh_quadratic_g",
"type": 16,
"count": 1
},
{
"name": "cc_sh_quadratic_b",
"type": 16,
"count": 1
},
{
"name": "cc_sh_quadratic_a",
"type": 16,
"count": 1
}
],
"defines": [],
"stageFlags": 16,
"binding": 0
}
],
"samplerTextures": [],
"samplers": [],
"textures": [],
"buffers": [],
"images": [],
"subpassInputs": []
},
{
"rate": 2,
"blocks": [],
"samplerTextures": [],
"samplers": [],
"textures": [],
"buffers": [],
"images": [],
"subpassInputs": []
},
{
"rate": 3,
"blocks": [
{
"tags": {
"builtin": "global"
},
"name": "CCGlobal",
"members": [
{
"name": "cc_time",
"typename": "vec4",
"type": 16,
"count": 1,
"precision": "highp "
},
{
"name": "cc_screenSize",
"typename": "vec4",
"type": 16,
"count": 1,
"precision": "mediump "
},
{
"name": "cc_nativeSize",
"typename": "vec4",
"type": 16,
"count": 1,
"precision": "mediump "
},
{
"name": "cc_probeInfo",
"typename": "vec4",
"type": 16,
"count": 1,
"precision": "mediump "
},
{
"name": "cc_debug_view_mode",
"typename": "vec4",
"type": 16,
"count": 1,
"precision": "mediump "
}
],
"defines": [],
"stageFlags": 17
},
{
"tags": {
"builtin": "global"
},
"name": "CCCamera",
"members": [
{
"name": "cc_matView",
"typename": "mat4",
"type": 25,
"count": 1,
"precision": "highp "
},
{
"name": "cc_matViewInv",
"typename": "mat4",
"type": 25,
"count": 1,
"precision": "highp "
},
{
"name": "cc_matProj",
"typename": "mat4",
"type": 25,
"count": 1,
"precision": "highp "
},
{
"name": "cc_matProjInv",
"typename": "mat4",
"type": 25,
"count": 1,
"precision": "highp "
},
{
"name": "cc_matViewProj",
"typename": "mat4",
"type": 25,
"count": 1,
"precision": "highp "
},
{
"name": "cc_matViewProjInv",
"typename": "mat4",
"type": 25,
"count": 1,
"precision": "highp "
},
{
"name": "cc_cameraPos",
"typename": "vec4",
"type": 16,
"count": 1,
"precision": "highp "
},
{
"name": "cc_surfaceTransform",
"typename": "vec4",
"type": 16,
"count": 1,
"precision": "mediump "
},
{
"name": "cc_screenScale",
"typename": "vec4",
"type": 16,
"count": 1,
"precision": "mediump "
},
{
"name": "cc_exposure",
"typename": "vec4",
"type": 16,
"count": 1,
"precision": "mediump "
},
{
"name": "cc_mainLitDir",
"typename": "vec4",
"type": 16,
"count": 1,
"precision": "mediump "
},
{
"name": "cc_mainLitColor",
"typename": "vec4",
"type": 16,
"count": 1,
"precision": "mediump "
},
{
"name": "cc_ambientSky",
"typename": "vec4",
"type": 16,
"count": 1,
"precision": "mediump "
},
{
"name": "cc_ambientGround",
"typename": "vec4",
"type": 16,
"count": 1,
"precision": "mediump "
},
{
"name": "cc_fogColor",
"typename": "vec4",
"type": 16,
"count": 1,
"precision": "mediump "
},
{
"name": "cc_fogBase",
"typename": "vec4",
"type": 16,
"count": 1,
"precision": "mediump "
},
{
"name": "cc_fogAdd",
"typename": "vec4",
"type": 16,
"count": 1,
"precision": "mediump "
},
{
"name": "cc_nearFar",
"typename": "vec4",
"type": 16,
"count": 1,
"precision": "mediump "
},
{
"name": "cc_viewPort",
"typename": "vec4",
"type": 16,
"count": 1,
"precision": "mediump "
}
],
"defines": [],
"stageFlags": 17
}
],
"samplerTextures": [],
"samplers": [],
"textures": [],
"buffers": [],
"images": [],
"subpassInputs": []
}
],
"hash": 3146087845,
"glsl4": {
"vert": "\nprecision mediump float;\nlayout(set = 2, binding = 0) uniform CCLocal {\n highp mat4 cc_matWorld;\n highp mat4 cc_matWorldIT;\n highp vec4 cc_lightingMapUVParam;\n highp vec4 cc_localShadowBias;\n highp vec4 cc_reflectionProbeData1;\n highp vec4 cc_reflectionProbeData2;\n};\nlayout(set = 0, binding = 0) uniform CCGlobal {\n highp vec4 cc_time;\n mediump vec4 cc_screenSize;\n mediump vec4 cc_nativeSize;\n mediump vec4 cc_probeInfo;\n mediump vec4 cc_debug_view_mode;\n};\nlayout(set = 0, binding = 1) uniform CCCamera {\n highp mat4 cc_matView;\n highp mat4 cc_matViewInv;\n highp mat4 cc_matProj;\n highp mat4 cc_matProjInv;\n highp mat4 cc_matViewProj;\n highp mat4 cc_matViewProjInv;\n highp vec4 cc_cameraPos;\n mediump vec4 cc_surfaceTransform;\n mediump vec4 cc_screenScale;\n mediump vec4 cc_exposure;\n mediump vec4 cc_mainLitDir;\n mediump vec4 cc_mainLitColor;\n mediump vec4 cc_ambientSky;\n mediump vec4 cc_ambientGround;\n mediump vec4 cc_fogColor;\n mediump vec4 cc_fogBase;\n mediump vec4 cc_fogAdd;\n mediump vec4 cc_nearFar;\n mediump vec4 cc_viewPort;\n};\nlayout(location = 0) in vec3 a_position;\nlayout(location = 1) in vec3 a_normal;\nlayout(location = 0) out vec3 normal_w;\nlayout(location = 1) out vec3 pos_w;\nlayout(location = 2) out vec3 pos_l;\nlayout(location = 3) out vec3 right;\nlayout(location = 4) out vec3 up;\nlayout(location = 5) out vec3 forward;\nvec4 vert () {\n vec4 pos = vec4(a_position, 1);\n vec4 normal = vec4(a_normal, 0);\n pos_l = a_position;\n pos_w = (cc_matWorld * pos).xyz;\n normal_w = (cc_matWorldIT * normal).xyz;\n right = vec3(cc_matView[0][0], cc_matView[1][0], cc_matView[2][0]);\n up = vec3(cc_matView[0][1], cc_matView[1][1], cc_matView[2][1]);\n forward = vec3(cc_matView[0][2], cc_matView[1][2], cc_matView[2][2]);\n return cc_matProj * (cc_matView * cc_matWorld) * pos;\n}\nvoid main() { gl_Position = vert(); }",
"frag": "\nprecision mediump float;\nmat3 transposeMat3 (mat3 v) {\n mat3 tmp;\n tmp[0] = vec3(v[0].x, v[1].x, v[2].x);\n tmp[1] = vec3(v[0].y, v[1].y, v[2].y);\n tmp[2] = vec3(v[0].z, v[1].z, v[2].z);\n return tmp;\n}\nvoid ClipQuadToHorizon (inout vec3 L[5], out int n) {\n int config = 0;\n if (L[0].z > 0.0) config += 1;\n if (L[1].z > 0.0) config += 2;\n if (L[2].z > 0.0) config += 4;\n if (L[3].z > 0.0) config += 8;\n config = 15;\n n = 0;\n if (config == 0)\n {\n }\n else if (config == 1) {\n n = 3;\n L[1] = -L[1].z * L[0] + L[0].z * L[1];\n L[2] = -L[3].z * L[0] + L[0].z * L[3];\n }\n else if (config == 2) {\n n = 3;\n L[0] = -L[0].z * L[1] + L[1].z * L[0];\n L[2] = -L[2].z * L[1] + L[1].z * L[2];\n }\n else if (config == 3) {\n n = 4;\n L[2] = -L[2].z * L[1] + L[1].z * L[2];\n L[3] = -L[3].z * L[0] + L[0].z * L[3];\n }\n else if (config == 4) {\n n = 3;\n L[0] = -L[3].z * L[2] + L[2].z * L[3];\n L[1] = -L[1].z * L[2] + L[2].z * L[1];\n }\n else if (config == 5) {\n n = 0;\n }\n else if (config == 6) {\n n = 4;\n L[0] = -L[0].z * L[1] + L[1].z * L[0];\n L[3] = -L[3].z * L[2] + L[2].z * L[3];\n }\n else if (config == 7) {\n n = 5;\n L[4] = -L[3].z * L[0] + L[0].z * L[3];\n L[3] = -L[3].z * L[2] + L[2].z * L[3];\n }\n else if (config == 8) {\n n = 3;\n L[0] = -L[0].z * L[3] + L[3].z * L[0];\n L[1] = -L[2].z * L[3] + L[3].z * L[2];\n L[2] = L[3];\n }\n else if (config == 9) {\n n = 4;\n L[1] = -L[1].z * L[0] + L[0].z * L[1];\n L[2] = -L[2].z * L[3] + L[3].z * L[2];\n }\n else if (config == 10) {\n n = 0;\n }\n else if (config == 11) {\n n = 5;\n L[4] = L[3];\n L[3] = -L[2].z * L[3] + L[3].z * L[2];\n L[2] = -L[2].z * L[1] + L[1].z * L[2];\n }\n else if (config == 12) {\n n = 4;\n L[1] = -L[1].z * L[2] + L[2].z * L[1];\n L[0] = -L[0].z * L[3] + L[3].z * L[0];\n }\n else if (config == 13) {\n n = 5;\n L[4] = L[3];\n L[3] = L[2];\n L[2] = -L[1].z * L[2] + L[2].z * L[1];\n L[1] = -L[1].z * L[0] + L[0].z * L[1];\n }\n else if (config == 14) {\n n = 5;\n L[4] = -L[0].z * L[3] + L[3].z * L[0];\n L[0] = -L[0].z * L[1] + L[1].z * L[0];\n }\n else if (config == 15) {\n n = 4;\n }\n if (n == 3) L[3] = L[0];\n if (n == 4) L[4] = L[0];\n}\nfloat IntegrateEdge (vec3 v1, vec3 v2) {\n float cosTheta = dot(v1, v2);\n float theta = acos(cosTheta);\n return cross(v1, v2).z * ((theta > 0.001) ? theta/sin(theta) : 4.0);\n}\nvec3 LTC_Evaluate (vec3 N, vec3 V, vec3 P, mat3 Minv, vec3 points[4]) {\n vec3 T1, T2;\n T1 = normalize(V - N*dot(V, N));\n T2 = cross(N, T1);\n Minv = Minv * transposeMat3(mat3(T1, T2, N));\n vec3 L[5];\n L[0] = Minv * (points[0] - P);\n L[1] = Minv * (points[1] - P);\n L[2] = Minv * (points[2] - P);\n L[3] = Minv * (points[3] - P);\n int n;\n ClipQuadToHorizon(L, n);\n if (n == 0) return vec3(0, 0, 0);\n L[0] = normalize(L[0]);\n L[1] = normalize(L[1]);\n L[2] = normalize(L[2]);\n L[3] = normalize(L[3]);\n L[4] = normalize(L[4]);\n float sum = 0.0;\n sum += IntegrateEdge(L[0], L[1]);\n sum += IntegrateEdge(L[1], L[2]);\n sum += IntegrateEdge(L[2], L[3]);\n if (n >= 4) sum += IntegrateEdge(L[3], L[4]);\n if (n == 5) sum += IntegrateEdge(L[4], L[0]);\n sum = max(0.0, sum);\n vec3 Lo_i = vec3(sum, sum, sum);\n return Lo_i;\n}\nlayout(set = 0, binding = 0) uniform CCGlobal {\n highp vec4 cc_time;\n mediump vec4 cc_screenSize;\n mediump vec4 cc_nativeSize;\n mediump vec4 cc_probeInfo;\n mediump vec4 cc_debug_view_mode;\n};\nlayout(set = 0, binding = 1) uniform CCCamera {\n highp mat4 cc_matView;\n highp mat4 cc_matViewInv;\n highp mat4 cc_matProj;\n highp mat4 cc_matProjInv;\n highp mat4 cc_matViewProj;\n highp mat4 cc_matViewProjInv;\n highp vec4 cc_cameraPos;\n mediump vec4 cc_surfaceTransform;\n mediump vec4 cc_screenScale;\n mediump vec4 cc_exposure;\n mediump vec4 cc_mainLitDir;\n mediump vec4 cc_mainLitColor;\n mediump vec4 cc_ambientSky;\n mediump vec4 cc_ambientGround;
},
"glsl3": {
"vert": "\nprecision mediump float;\nlayout(std140) uniform CCLocal {\n highp mat4 cc_matWorld;\n highp mat4 cc_matWorldIT;\n highp vec4 cc_lightingMapUVParam;\n highp vec4 cc_localShadowBias;\n highp vec4 cc_reflectionProbeData1;\n highp vec4 cc_reflectionProbeData2;\n};\nlayout(std140) uniform CCGlobal {\n highp vec4 cc_time;\n mediump vec4 cc_screenSize;\n mediump vec4 cc_nativeSize;\n mediump vec4 cc_probeInfo;\n mediump vec4 cc_debug_view_mode;\n};\nlayout(std140) uniform CCCamera {\n highp mat4 cc_matView;\n highp mat4 cc_matViewInv;\n highp mat4 cc_matProj;\n highp mat4 cc_matProjInv;\n highp mat4 cc_matViewProj;\n highp mat4 cc_matViewProjInv;\n highp vec4 cc_cameraPos;\n mediump vec4 cc_surfaceTransform;\n mediump vec4 cc_screenScale;\n mediump vec4 cc_exposure;\n mediump vec4 cc_mainLitDir;\n mediump vec4 cc_mainLitColor;\n mediump vec4 cc_ambientSky;\n mediump vec4 cc_ambientGround;\n mediump vec4 cc_fogColor;\n mediump vec4 cc_fogBase;\n mediump vec4 cc_fogAdd;\n mediump vec4 cc_nearFar;\n mediump vec4 cc_viewPort;\n};\nin vec3 a_position;\nin vec3 a_normal;\nout vec3 normal_w;\nout vec3 pos_w;\nout vec3 pos_l;\nout vec3 right;\nout vec3 up;\nout vec3 forward;\nvec4 vert () {\n vec4 pos = vec4(a_position, 1);\n vec4 normal = vec4(a_normal, 0);\n pos_l = a_position;\n pos_w = (cc_matWorld * pos).xyz;\n normal_w = (cc_matWorldIT * normal).xyz;\n right = vec3(cc_matView[0][0], cc_matView[1][0], cc_matView[2][0]);\n up = vec3(cc_matView[0][1], cc_matView[1][1], cc_matView[2][1]);\n forward = vec3(cc_matView[0][2], cc_matView[1][2], cc_matView[2][2]);\n return cc_matProj * (cc_matView * cc_matWorld) * pos;\n}\nvoid main() { gl_Position = vert(); }",
"frag": "\nprecision mediump float;\nmat3 transposeMat3 (mat3 v) {\n mat3 tmp;\n tmp[0] = vec3(v[0].x, v[1].x, v[2].x);\n tmp[1] = vec3(v[0].y, v[1].y, v[2].y);\n tmp[2] = vec3(v[0].z, v[1].z, v[2].z);\n return tmp;\n}\nvoid ClipQuadToHorizon (inout vec3 L[5], out int n) {\n int config = 0;\n if (L[0].z > 0.0) config += 1;\n if (L[1].z > 0.0) config += 2;\n if (L[2].z > 0.0) config += 4;\n if (L[3].z > 0.0) config += 8;\n config = 15;\n n = 0;\n if (config == 0)\n {\n }\n else if (config == 1) {\n n = 3;\n L[1] = -L[1].z * L[0] + L[0].z * L[1];\n L[2] = -L[3].z * L[0] + L[0].z * L[3];\n }\n else if (config == 2) {\n n = 3;\n L[0] = -L[0].z * L[1] + L[1].z * L[0];\n L[2] = -L[2].z * L[1] + L[1].z * L[2];\n }\n else if (config == 3) {\n n = 4;\n L[2] = -L[2].z * L[1] + L[1].z * L[2];\n L[3] = -L[3].z * L[0] + L[0].z * L[3];\n }\n else if (config == 4) {\n n = 3;\n L[0] = -L[3].z * L[2] + L[2].z * L[3];\n L[1] = -L[1].z * L[2] + L[2].z * L[1];\n }\n else if (config == 5) {\n n = 0;\n }\n else if (config == 6) {\n n = 4;\n L[0] = -L[0].z * L[1] + L[1].z * L[0];\n L[3] = -L[3].z * L[2] + L[2].z * L[3];\n }\n else if (config == 7) {\n n = 5;\n L[4] = -L[3].z * L[0] + L[0].z * L[3];\n L[3] = -L[3].z * L[2] + L[2].z * L[3];\n }\n else if (config == 8) {\n n = 3;\n L[0] = -L[0].z * L[3] + L[3].z * L[0];\n L[1] = -L[2].z * L[3] + L[3].z * L[2];\n L[2] = L[3];\n }\n else if (config == 9) {\n n = 4;\n L[1] = -L[1].z * L[0] + L[0].z * L[1];\n L[2] = -L[2].z * L[3] + L[3].z * L[2];\n }\n else if (config == 10) {\n n = 0;\n }\n else if (config == 11) {\n n = 5;\n L[4] = L[3];\n L[3] = -L[2].z * L[3] + L[3].z * L[2];\n L[2] = -L[2].z * L[1] + L[1].z * L[2];\n }\n else if (config == 12) {\n n = 4;\n L[1] = -L[1].z * L[2] + L[2].z * L[1];\n L[0] = -L[0].z * L[3] + L[3].z * L[0];\n }\n else if (config == 13) {\n n = 5;\n L[4] = L[3];\n L[3] = L[2];\n L[2] = -L[1].z * L[2] + L[2].z * L[1];\n L[1] = -L[1].z * L[0] + L[0].z * L[1];\n }\n else if (config == 14) {\n n = 5;\n L[4] = -L[0].z * L[3] + L[3].z * L[0];\n L[0] = -L[0].z * L[1] + L[1].z * L[0];\n }\n else if (config == 15) {\n n = 4;\n }\n if (n == 3) L[3] = L[0];\n if (n == 4) L[4] = L[0];\n}\nfloat IntegrateEdge (vec3 v1, vec3 v2) {\n float cosTheta = dot(v1, v2);\n float theta = acos(cosTheta);\n return cross(v1, v2).z * ((theta > 0.001) ? theta/sin(theta) : 4.0);\n}\nvec3 LTC_Evaluate (vec3 N, vec3 V, vec3 P, mat3 Minv, vec3 points[4]) {\n vec3 T1, T2;\n T1 = normalize(V - N*dot(V, N));\n T2 = cross(N, T1);\n Minv = Minv * transposeMat3(mat3(T1, T2, N));\n vec3 L[5];\n L[0] = Minv * (points[0] - P);\n L[1] = Minv * (points[1] - P);\n L[2] = Minv * (points[2] - P);\n L[3] = Minv * (points[3] - P);\n int n;\n ClipQuadToHorizon(L, n);\n if (n == 0) return vec3(0, 0, 0);\n L[0] = normalize(L[0]);\n L[1] = normalize(L[1]);\n L[2] = normalize(L[2]);\n L[3] = normalize(L[3]);\n L[4] = normalize(L[4]);\n float sum = 0.0;\n sum += IntegrateEdge(L[0], L[1]);\n sum += IntegrateEdge(L[1], L[2]);\n sum += IntegrateEdge(L[2], L[3]);\n if (n >= 4) sum += IntegrateEdge(L[3], L[4]);\n if (n == 5) sum += IntegrateEdge(L[4], L[0]);\n sum = max(0.0, sum);\n vec3 Lo_i = vec3(sum, sum, sum);\n return Lo_i;\n}\nlayout(std140) uniform CCGlobal {\n highp vec4 cc_time;\n mediump vec4 cc_screenSize;\n mediump vec4 cc_nativeSize;\n mediump vec4 cc_probeInfo;\n mediump vec4 cc_debug_view_mode;\n};\nlayout(std140) uniform CCCamera {\n highp mat4 cc_matView;\n highp mat4 cc_matViewInv;\n highp mat4 cc_matProj;\n highp mat4 cc_matProjInv;\n highp mat4 cc_matViewProj;\n highp mat4 cc_matViewProjInv;\n highp vec4 cc_cameraPos;\n mediump vec4 cc_surfaceTransform;\n mediump vec4 cc_screenScale;\n mediump vec4 cc_exposure;\n mediump vec4 cc_mainLitDir;\n mediump vec4 cc_mainLitColor;\n mediump vec4 cc_ambientSky;\n mediump vec4 cc_ambientGround;\n mediump vec4 cc_fogColor
},
"glsl1": {
"vert": "\nprecision mediump float;\nuniform highp mat4 cc_matWorld;\n uniform highp mat4 cc_matWorldIT;\nuniform highp mat4 cc_matView;\n uniform highp mat4 cc_matProj;\nattribute vec3 a_position;\nattribute vec3 a_normal;\nvarying vec3 normal_w;\nvarying vec3 pos_w;\nvarying vec3 pos_l;\nvarying vec3 right;\nvarying vec3 up;\nvarying vec3 forward;\nvec4 vert () {\n vec4 pos = vec4(a_position, 1);\n vec4 normal = vec4(a_normal, 0);\n pos_l = a_position;\n pos_w = (cc_matWorld * pos).xyz;\n normal_w = (cc_matWorldIT * normal).xyz;\n right = vec3(cc_matView[0][0], cc_matView[1][0], cc_matView[2][0]);\n up = vec3(cc_matView[0][1], cc_matView[1][1], cc_matView[2][1]);\n forward = vec3(cc_matView[0][2], cc_matView[1][2], cc_matView[2][2]);\n return cc_matProj * (cc_matView * cc_matWorld) * pos;\n}\nvoid main() { gl_Position = vert(); }",
"frag": "\nprecision mediump float;\nmat3 transposeMat3 (mat3 v) {\n mat3 tmp;\n tmp[0] = vec3(v[0].x, v[1].x, v[2].x);\n tmp[1] = vec3(v[0].y, v[1].y, v[2].y);\n tmp[2] = vec3(v[0].z, v[1].z, v[2].z);\n return tmp;\n}\nvoid ClipQuadToHorizon (inout vec3 L[5], out int n) {\n int config = 0;\n if (L[0].z > 0.0) config += 1;\n if (L[1].z > 0.0) config += 2;\n if (L[2].z > 0.0) config += 4;\n if (L[3].z > 0.0) config += 8;\n config = 15;\n n = 0;\n if (config == 0)\n {\n }\n else if (config == 1) {\n n = 3;\n L[1] = -L[1].z * L[0] + L[0].z * L[1];\n L[2] = -L[3].z * L[0] + L[0].z * L[3];\n }\n else if (config == 2) {\n n = 3;\n L[0] = -L[0].z * L[1] + L[1].z * L[0];\n L[2] = -L[2].z * L[1] + L[1].z * L[2];\n }\n else if (config == 3) {\n n = 4;\n L[2] = -L[2].z * L[1] + L[1].z * L[2];\n L[3] = -L[3].z * L[0] + L[0].z * L[3];\n }\n else if (config == 4) {\n n = 3;\n L[0] = -L[3].z * L[2] + L[2].z * L[3];\n L[1] = -L[1].z * L[2] + L[2].z * L[1];\n }\n else if (config == 5) {\n n = 0;\n }\n else if (config == 6) {\n n = 4;\n L[0] = -L[0].z * L[1] + L[1].z * L[0];\n L[3] = -L[3].z * L[2] + L[2].z * L[3];\n }\n else if (config == 7) {\n n = 5;\n L[4] = -L[3].z * L[0] + L[0].z * L[3];\n L[3] = -L[3].z * L[2] + L[2].z * L[3];\n }\n else if (config == 8) {\n n = 3;\n L[0] = -L[0].z * L[3] + L[3].z * L[0];\n L[1] = -L[2].z * L[3] + L[3].z * L[2];\n L[2] = L[3];\n }\n else if (config == 9) {\n n = 4;\n L[1] = -L[1].z * L[0] + L[0].z * L[1];\n L[2] = -L[2].z * L[3] + L[3].z * L[2];\n }\n else if (config == 10) {\n n = 0;\n }\n else if (config == 11) {\n n = 5;\n L[4] = L[3];\n L[3] = -L[2].z * L[3] + L[3].z * L[2];\n L[2] = -L[2].z * L[1] + L[1].z * L[2];\n }\n else if (config == 12) {\n n = 4;\n L[1] = -L[1].z * L[2] + L[2].z * L[1];\n L[0] = -L[0].z * L[3] + L[3].z * L[0];\n }\n else if (config == 13) {\n n = 5;\n L[4] = L[3];\n L[3] = L[2];\n L[2] = -L[1].z * L[2] + L[2].z * L[1];\n L[1] = -L[1].z * L[0] + L[0].z * L[1];\n }\n else if (config == 14) {\n n = 5;\n L[4] = -L[0].z * L[3] + L[3].z * L[0];\n L[0] = -L[0].z * L[1] + L[1].z * L[0];\n }\n else if (config == 15) {\n n = 4;\n }\n if (n == 3) L[3] = L[0];\n if (n == 4) L[4] = L[0];\n}\nfloat IntegrateEdge (vec3 v1, vec3 v2) {\n float cosTheta = dot(v1, v2);\n float theta = acos(cosTheta);\n return cross(v1, v2).z * ((theta > 0.001) ? theta/sin(theta) : 4.0);\n}\nvec3 LTC_Evaluate (vec3 N, vec3 V, vec3 P, mat3 Minv, vec3 points[4]) {\n vec3 T1, T2;\n T1 = normalize(V - N*dot(V, N));\n T2 = cross(N, T1);\n Minv = Minv * transposeMat3(mat3(T1, T2, N));\n vec3 L[5];\n L[0] = Minv * (points[0] - P);\n L[1] = Minv * (points[1] - P);\n L[2] = Minv * (points[2] - P);\n L[3] = Minv * (points[3] - P);\n int n;\n ClipQuadToHorizon(L, n);\n if (n == 0) return vec3(0, 0, 0);\n L[0] = normalize(L[0]);\n L[1] = normalize(L[1]);\n L[2] = normalize(L[2]);\n L[3] = normalize(L[3]);\n L[4] = normalize(L[4]);\n float sum = 0.0;\n sum += IntegrateEdge(L[0], L[1]);\n sum += IntegrateEdge(L[1], L[2]);\n sum += IntegrateEdge(L[2], L[3]);\n if (n >= 4) sum += IntegrateEdge(L[3], L[4]);\n if (n == 5) sum += IntegrateEdge(L[4], L[0]);\n sum = max(0.0, sum);\n vec3 Lo_i = vec3(sum, sum, sum);\n return Lo_i;\n}\nuniform mediump vec4 cc_debug_view_mode;\nuniform highp vec4 cc_cameraPos;\n uniform mediump vec4 cc_surfaceTransform;\n uniform mediump vec4 cc_exposure;\n#define CC_SURFACES_DEBUG_VIEW_VERTEX_COLOR 1\n#define CC_SURFACES_DEBUG_VIEW_VERTEX_NORMAL CC_SURFACES_DEBUG_VIEW_VERTEX_COLOR + 1\n#define CC_SURFACES_DEBUG_VIEW_VERTEX_TANGENT CC_SURFACES_DEBUG_VIEW_VERTEX_NORMAL + 1\n#define CC_SURFACES_DEBUG_VIEW_WORLD_POS CC_SURFACES_DEBUG_VIEW_VERTEX_TANGENT + 1\n#define CC_SURFACES_DEBUG_VIEW_VERTEX_MIRROR CC_SURFACES_DEBUG_VIEW_WORLD_POS + 1\n#define CC_SURFACES_DEBUG_VIEW_FACE_SIDE CC_SURFACES_DEBUG_VIEW_VERTEX_MIRROR + 1\n#define CC_SURFACES_DEBUG_VIEW_UV0 CC_SURFACES_DEBUG_VIEW_FACE_SID
},
"builtins": {
"globals": {
"blocks": [
{
"name": "CCGlobal",
"defines": []
},
{
"name": "CCCamera",
"defines": []
}
],
"samplerTextures": [],
"buffers": [],
"images": []
},
"locals": {
"blocks": [
{
"name": "CCLocal",
"defines": []
}
],
"samplerTextures": [],
"buffers": [],
"images": []
},
"statistics": {
"CC_EFFECT_USED_VERTEX_UNIFORM_VECTORS": 54,
"CC_EFFECT_USED_FRAGMENT_UNIFORM_VECTORS": 50
}
},
"defines": [
{
"name": "CC_USE_DEBUG_VIEW",
"type": "number",
"defines": [],
"range": [
0,
3
]
},
{
"name": "CC_SURFACES_ENABLE_DEBUG_VIEW",
"type": "boolean",
"defines": [
"CC_USE_DEBUG_VIEW",
"CC_SURFACES_DEBUG_VIEW_COMPOSITE_AND_MISC"
]
},
{
"name": "CC_USE_LIGHT_PROBE",
"type": "boolean",
"defines": [],
"default": 0
},
{
"name": "CC_USE_RGBE_OUTPUT",
"type": "boolean",
"defines": [
"CC_USE_LIGHT_PROBE"
]
},
{
"name": "CC_USE_FLOAT_OUTPUT",
"type": "boolean",
"defines": [
"CC_USE_LIGHT_PROBE",
"!CC_USE_RGBE_OUTPUT"
]
},
{
"name": "CC_USE_HDR",
"type": "boolean",
"defines": [
"CC_USE_LIGHT_PROBE",
"CC_USE_LIGHT_PROBE"
]
},
{
"name": "CC_TONE_MAPPING_TYPE",
"type": "number",
"defines": [
"CC_USE_HDR",
"CC_USE_LIGHT_PROBE",
"!CC_USE_RGBE_OUTPUT",
"!CC_USE_FLOAT_OUTPUT"
],
"range": [
0,
3
]
},
{
"name": "HDR_TONE_MAPPING_ACES",
"type": "boolean",
"defines": [
"CC_USE_HDR",
"CC_TONE_MAPPING_TYPE",
"CC_USE_LIGHT_PROBE",
"!CC_USE_RGBE_OUTPUT",
"!CC_USE_FLOAT_OUTPUT"
]
},
{
"name": "USE_INSTANCING",
"type": "boolean",
"defines": [
"CC_USE_LIGHT_PROBE",
"CC_USE_LIGHT_PROBE"
]
},
{
"name": "USE_FORWARD_PIPELINE",
"type": "boolean",
"defines": [
"CC_USE_LIGHT_PROBE"
]
}
],
"name": "internal/editor/light-probe-visualization|gizmo-vs:vert|gizmo-fs:front"
},
{
"blocks": [
{
"name": "Constant",
"members": [
{
"name": "mainColor",
"type": 16,
"count": 1
},
{
"name": "cc_sh_linear_const_r",
"type": 16,
"count": 1
},
{
"name": "cc_sh_linear_const_g",
"type": 16,
"count": 1
},
{
"name": "cc_sh_linear_const_b",
"type": 16,
"count": 1
},
{
"name": "cc_sh_quadratic_r",
"type": 16,
"count": 1
},
{
"name": "cc_sh_quadratic_g",
"type": 16,
"count": 1
},
{
"name": "cc_sh_quadratic_b",
"type": 16,
"count": 1
},
{
"name": "cc_sh_quadratic_a",
"type": 16,
"count": 1
}
],
"defines": [],
"stageFlags": 16,
"binding": 0
}
],
"samplerTextures": [],
"samplers": [],
"textures": [],
"buffers": [],
"images": [],
"subpassInputs": [],
"attributes": [
{
"name": "a_position",
"defines": [],
"format": 32,
"location": 0
},
{
"name": "a_normal",
"defines": [],
"format": 32,
"location": 1
}
],
"varyings": [
{
"name": "normal_w",
"type": 15,
"count": 1,
"defines": [],
"stageFlags": 17,
"location": 0
},
{
"name": "pos_w",
"type": 15,
"count": 1,
"defines": [],
"stageFlags": 17,
"location": 1
},
{
"name": "pos_l",
"type": 15,
"count": 1,
"defines": [],
"stageFlags": 17,
"location": 2
},
{
"name": "right",
"type": 15,
"count": 1,
"defines": [],
"stageFlags": 17,
"location": 3
},
{
"name": "up",
"type": 15,
"count": 1,
"defines": [],
"stageFlags": 17,
"location": 4
},
{
"name": "forward",
"type": 15,
"count": 1,
"defines": [],
"stageFlags": 17,
"location": 5
}
],
"fragColors": [
{
"name": "cc_FragColor",
"typename": "vec4",
"type": 16,
"count": 1,
"defines": [],
"stageFlags": 16,
"location": 0
}
],
"descriptors": [
{
"rate": 0,
"blocks": [
{
"tags": {
"builtin": "local"
},
"name": "CCLocal",
"members": [
{
"name": "cc_matWorld",
"typename": "mat4",
"type": 25,
"count": 1,
"precision": "highp "
},
{
"name": "cc_matWorldIT",
"typename": "mat4",
"type": 25,
"count": 1,
"precision": "highp "
},
{
"name": "cc_lightingMapUVParam",
"typename": "vec4",
"type": 16,
"count": 1,
"precision": "highp "
},
{
"name": "cc_localShadowBias",
"typename": "vec4",
"type": 16,
"count": 1,
"precision": "highp "
},
{
"name": "cc_reflectionProbeData1",
"typename": "vec4",
"type": 16,
"count": 1,
"precision": "highp "
},
{
"name": "cc_reflectionProbeData2",
"typename": "vec4",
"type": 16,
"count": 1,
"precision": "highp "
}
],
"defines": [],
"stageFlags": 1
}
],
"samplerTextures": [],
"samplers": [],
"textures": [],
"buffers": [],
"images": [],
"subpassInputs": []
},
{
"rate": 1,
"blocks": [
{
"name": "Constant",
"members": [
{
"name": "mainColor",
"type": 16,
"count": 1
},
{
"name": "cc_sh_linear_const_r",
"type": 16,
"count": 1
},
{
"name": "cc_sh_linear_const_g",
"type": 16,
"count": 1
},
{
"name": "cc_sh_linear_const_b",
"type": 16,
"count": 1
},
{
"name": "cc_sh_quadratic_r",
"type": 16,
"count": 1
},
{
"name": "cc_sh_quadratic_g",
"type": 16,
"count": 1
},
{
"name": "cc_sh_quadratic_b",
"type": 16,
"count": 1
},
{
"name": "cc_sh_quadratic_a",
"type": 16,
"count": 1
}
],
"defines": [],
"stageFlags": 16,
"binding": 0
}
],
"samplerTextures": [],
"samplers": [],
"textures": [],
"buffers": [],
"images": [],
"subpassInputs": []
},
{
"rate": 2,
"blocks": [],
"samplerTextures": [],
"samplers": [],
"textures": [],
"buffers": [],
"images": [],
"subpassInputs": []
},
{
"rate": 3,
"blocks": [
{
"tags": {
"builtin": "global"
},
"name": "CCGlobal",
"members": [
{
"name": "cc_time",
"typename": "vec4",
"type": 16,
"count": 1,
"precision": "highp "
},
{
"name": "cc_screenSize",
"typename": "vec4",
"type": 16,
"count": 1,
"precision": "mediump "
},
{
"name": "cc_nativeSize",
"typename": "vec4",
"type": 16,
"count": 1,
"precision": "mediump "
},
{
"name": "cc_probeInfo",
"typename": "vec4",
"type": 16,
"count": 1,
"precision": "mediump "
},
{
"name": "cc_debug_view_mode",
"typename": "vec4",
"type": 16,
"count": 1,
"precision": "mediump "
}
],
"defines": [],
"stageFlags": 17
},
{
"tags": {
"builtin": "global"
},
"name": "CCCamera",
"members": [
{
"name": "cc_matView",
"typename": "mat4",
"type": 25,
"count": 1,
"precision": "highp "
},
{
"name": "cc_matViewInv",
"typename": "mat4",
"type": 25,
"count": 1,
"precision": "highp "
},
{
"name": "cc_matProj",
"typename": "mat4",
"type": 25,
"count": 1,
"precision": "highp "
},
{
"name": "cc_matProjInv",
"typename": "mat4",
"type": 25,
"count": 1,
"precision": "highp "
},
{
"name": "cc_matViewProj",
"typename": "mat4",
"type": 25,
"count": 1,
"precision": "highp "
},
{
"name": "cc_matViewProjInv",
"typename": "mat4",
"type": 25,
"count": 1,
"precision": "highp "
},
{
"name": "cc_cameraPos",
"typename": "vec4",
"type": 16,
"count": 1,
"precision": "highp "
},
{
"name": "cc_surfaceTransform",
"typename": "vec4",
"type": 16,
"count": 1,
"precision": "mediump "
},
{
"name": "cc_screenScale",
"typename": "vec4",
"type": 16,
"count": 1,
"precision": "mediump "
},
{
"name": "cc_exposure",
"typename": "vec4",
"type": 16,
"count": 1,
"precision": "mediump "
},
{
"name": "cc_mainLitDir",
"typename": "vec4",
"type": 16,
"count": 1,
"precision": "mediump "
},
{
"name": "cc_mainLitColor",
"typename": "vec4",
"type": 16,
"count": 1,
"precision": "mediump "
},
{
"name": "cc_ambientSky",
"typename": "vec4",
"type": 16,
"count": 1,
"precision": "mediump "
},
{
"name": "cc_ambientGround",
"typename": "vec4",
"type": 16,
"count": 1,
"precision": "mediump "
},
{
"name": "cc_fogColor",
"typename": "vec4",
"type": 16,
"count": 1,
"precision": "mediump "
},
{
"name": "cc_fogBase",
"typename": "vec4",
"type": 16,
"count": 1,
"precision": "mediump "
},
{
"name": "cc_fogAdd",
"typename": "vec4",
"type": 16,
"count": 1,
"precision": "mediump "
},
{
"name": "cc_nearFar",
"typename": "vec4",
"type": 16,
"count": 1,
"precision": "mediump "
},
{
"name": "cc_viewPort",
"typename": "vec4",
"type": 16,
"count": 1,
"precision": "mediump "
}
],
"defines": [],
"stageFlags": 17
}
],
"samplerTextures": [],
"samplers": [],
"textures": [],
"buffers": [],
"images": [],
"subpassInputs": []
}
],
"hash": 1986355471,
"glsl4": {
"vert": "\nprecision mediump float;\nlayout(set = 2, binding = 0) uniform CCLocal {\n highp mat4 cc_matWorld;\n highp mat4 cc_matWorldIT;\n highp vec4 cc_lightingMapUVParam;\n highp vec4 cc_localShadowBias;\n highp vec4 cc_reflectionProbeData1;\n highp vec4 cc_reflectionProbeData2;\n};\nlayout(set = 0, binding = 0) uniform CCGlobal {\n highp vec4 cc_time;\n mediump vec4 cc_screenSize;\n mediump vec4 cc_nativeSize;\n mediump vec4 cc_probeInfo;\n mediump vec4 cc_debug_view_mode;\n};\nlayout(set = 0, binding = 1) uniform CCCamera {\n highp mat4 cc_matView;\n highp mat4 cc_matViewInv;\n highp mat4 cc_matProj;\n highp mat4 cc_matProjInv;\n highp mat4 cc_matViewProj;\n highp mat4 cc_matViewProjInv;\n highp vec4 cc_cameraPos;\n mediump vec4 cc_surfaceTransform;\n mediump vec4 cc_screenScale;\n mediump vec4 cc_exposure;\n mediump vec4 cc_mainLitDir;\n mediump vec4 cc_mainLitColor;\n mediump vec4 cc_ambientSky;\n mediump vec4 cc_ambientGround;\n mediump vec4 cc_fogColor;\n mediump vec4 cc_fogBase;\n mediump vec4 cc_fogAdd;\n mediump vec4 cc_nearFar;\n mediump vec4 cc_viewPort;\n};\nlayout(location = 0) in vec3 a_position;\nlayout(location = 1) in vec3 a_normal;\nlayout(location = 0) out vec3 normal_w;\nlayout(location = 1) out vec3 pos_w;\nlayout(location = 2) out vec3 pos_l;\nlayout(location = 3) out vec3 right;\nlayout(location = 4) out vec3 up;\nlayout(location = 5) out vec3 forward;\nvec4 vert () {\n vec4 pos = vec4(a_position, 1);\n vec4 normal = vec4(a_normal, 0);\n pos_l = a_position;\n pos_w = (cc_matWorld * pos).xyz;\n normal_w = (cc_matWorldIT * normal).xyz;\n right = vec3(cc_matView[0][0], cc_matView[1][0], cc_matView[2][0]);\n up = vec3(cc_matView[0][1], cc_matView[1][1], cc_matView[2][1]);\n forward = vec3(cc_matView[0][2], cc_matView[1][2], cc_matView[2][2]);\n return cc_matProj * (cc_matView * cc_matWorld) * pos;\n}\nvoid main() { gl_Position = vert(); }",
"frag": "\nprecision mediump float;\nmat3 transposeMat3 (mat3 v) {\n mat3 tmp;\n tmp[0] = vec3(v[0].x, v[1].x, v[2].x);\n tmp[1] = vec3(v[0].y, v[1].y, v[2].y);\n tmp[2] = vec3(v[0].z, v[1].z, v[2].z);\n return tmp;\n}\nvoid ClipQuadToHorizon (inout vec3 L[5], out int n) {\n int config = 0;\n if (L[0].z > 0.0) config += 1;\n if (L[1].z > 0.0) config += 2;\n if (L[2].z > 0.0) config += 4;\n if (L[3].z > 0.0) config += 8;\n config = 15;\n n = 0;\n if (config == 0)\n {\n }\n else if (config == 1) {\n n = 3;\n L[1] = -L[1].z * L[0] + L[0].z * L[1];\n L[2] = -L[3].z * L[0] + L[0].z * L[3];\n }\n else if (config == 2) {\n n = 3;\n L[0] = -L[0].z * L[1] + L[1].z * L[0];\n L[2] = -L[2].z * L[1] + L[1].z * L[2];\n }\n else if (config == 3) {\n n = 4;\n L[2] = -L[2].z * L[1] + L[1].z * L[2];\n L[3] = -L[3].z * L[0] + L[0].z * L[3];\n }\n else if (config == 4) {\n n = 3;\n L[0] = -L[3].z * L[2] + L[2].z * L[3];\n L[1] = -L[1].z * L[2] + L[2].z * L[1];\n }\n else if (config == 5) {\n n = 0;\n }\n else if (config == 6) {\n n = 4;\n L[0] = -L[0].z * L[1] + L[1].z * L[0];\n L[3] = -L[3].z * L[2] + L[2].z * L[3];\n }\n else if (config == 7) {\n n = 5;\n L[4] = -L[3].z * L[0] + L[0].z * L[3];\n L[3] = -L[3].z * L[2] + L[2].z * L[3];\n }\n else if (config == 8) {\n n = 3;\n L[0] = -L[0].z * L[3] + L[3].z * L[0];\n L[1] = -L[2].z * L[3] + L[3].z * L[2];\n L[2] = L[3];\n }\n else if (config == 9) {\n n = 4;\n L[1] = -L[1].z * L[0] + L[0].z * L[1];\n L[2] = -L[2].z * L[3] + L[3].z * L[2];\n }\n else if (config == 10) {\n n = 0;\n }\n else if (config == 11) {\n n = 5;\n L[4] = L[3];\n L[3] = -L[2].z * L[3] + L[3].z * L[2];\n L[2] = -L[2].z * L[1] + L[1].z * L[2];\n }\n else if (config == 12) {\n n = 4;\n L[1] = -L[1].z * L[2] + L[2].z * L[1];\n L[0] = -L[0].z * L[3] + L[3].z * L[0];\n }\n else if (config == 13) {\n n = 5;\n L[4] = L[3];\n L[3] = L[2];\n L[2] = -L[1].z * L[2] + L[2].z * L[1];\n L[1] = -L[1].z * L[0] + L[0].z * L[1];\n }\n else if (config == 14) {\n n = 5;\n L[4] = -L[0].z * L[3] + L[3].z * L[0];\n L[0] = -L[0].z * L[1] + L[1].z * L[0];\n }\n else if (config == 15) {\n n = 4;\n }\n if (n == 3) L[3] = L[0];\n if (n == 4) L[4] = L[0];\n}\nfloat IntegrateEdge (vec3 v1, vec3 v2) {\n float cosTheta = dot(v1, v2);\n float theta = acos(cosTheta);\n return cross(v1, v2).z * ((theta > 0.001) ? theta/sin(theta) : 4.0);\n}\nvec3 LTC_Evaluate (vec3 N, vec3 V, vec3 P, mat3 Minv, vec3 points[4]) {\n vec3 T1, T2;\n T1 = normalize(V - N*dot(V, N));\n T2 = cross(N, T1);\n Minv = Minv * transposeMat3(mat3(T1, T2, N));\n vec3 L[5];\n L[0] = Minv * (points[0] - P);\n L[1] = Minv * (points[1] - P);\n L[2] = Minv * (points[2] - P);\n L[3] = Minv * (points[3] - P);\n int n;\n ClipQuadToHorizon(L, n);\n if (n == 0) return vec3(0, 0, 0);\n L[0] = normalize(L[0]);\n L[1] = normalize(L[1]);\n L[2] = normalize(L[2]);\n L[3] = normalize(L[3]);\n L[4] = normalize(L[4]);\n float sum = 0.0;\n sum += IntegrateEdge(L[0], L[1]);\n sum += IntegrateEdge(L[1], L[2]);\n sum += IntegrateEdge(L[2], L[3]);\n if (n >= 4) sum += IntegrateEdge(L[3], L[4]);\n if (n == 5) sum += IntegrateEdge(L[4], L[0]);\n sum = max(0.0, sum);\n vec3 Lo_i = vec3(sum, sum, sum);\n return Lo_i;\n}\nlayout(set = 0, binding = 0) uniform CCGlobal {\n highp vec4 cc_time;\n mediump vec4 cc_screenSize;\n mediump vec4 cc_nativeSize;\n mediump vec4 cc_probeInfo;\n mediump vec4 cc_debug_view_mode;\n};\nlayout(set = 0, binding = 1) uniform CCCamera {\n highp mat4 cc_matView;\n highp mat4 cc_matViewInv;\n highp mat4 cc_matProj;\n highp mat4 cc_matProjInv;\n highp mat4 cc_matViewProj;\n highp mat4 cc_matViewProjInv;\n highp vec4 cc_cameraPos;\n mediump vec4 cc_surfaceTransform;\n mediump vec4 cc_screenScale;\n mediump vec4 cc_exposure;\n mediump vec4 cc_mainLitDir;\n mediump vec4 cc_mainLitColor;\n mediump vec4 cc_ambientSky;\n mediump vec4 cc_ambientGround;
},
"glsl3": {
"vert": "\nprecision mediump float;\nlayout(std140) uniform CCLocal {\n highp mat4 cc_matWorld;\n highp mat4 cc_matWorldIT;\n highp vec4 cc_lightingMapUVParam;\n highp vec4 cc_localShadowBias;\n highp vec4 cc_reflectionProbeData1;\n highp vec4 cc_reflectionProbeData2;\n};\nlayout(std140) uniform CCGlobal {\n highp vec4 cc_time;\n mediump vec4 cc_screenSize;\n mediump vec4 cc_nativeSize;\n mediump vec4 cc_probeInfo;\n mediump vec4 cc_debug_view_mode;\n};\nlayout(std140) uniform CCCamera {\n highp mat4 cc_matView;\n highp mat4 cc_matViewInv;\n highp mat4 cc_matProj;\n highp mat4 cc_matProjInv;\n highp mat4 cc_matViewProj;\n highp mat4 cc_matViewProjInv;\n highp vec4 cc_cameraPos;\n mediump vec4 cc_surfaceTransform;\n mediump vec4 cc_screenScale;\n mediump vec4 cc_exposure;\n mediump vec4 cc_mainLitDir;\n mediump vec4 cc_mainLitColor;\n mediump vec4 cc_ambientSky;\n mediump vec4 cc_ambientGround;\n mediump vec4 cc_fogColor;\n mediump vec4 cc_fogBase;\n mediump vec4 cc_fogAdd;\n mediump vec4 cc_nearFar;\n mediump vec4 cc_viewPort;\n};\nin vec3 a_position;\nin vec3 a_normal;\nout vec3 normal_w;\nout vec3 pos_w;\nout vec3 pos_l;\nout vec3 right;\nout vec3 up;\nout vec3 forward;\nvec4 vert () {\n vec4 pos = vec4(a_position, 1);\n vec4 normal = vec4(a_normal, 0);\n pos_l = a_position;\n pos_w = (cc_matWorld * pos).xyz;\n normal_w = (cc_matWorldIT * normal).xyz;\n right = vec3(cc_matView[0][0], cc_matView[1][0], cc_matView[2][0]);\n up = vec3(cc_matView[0][1], cc_matView[1][1], cc_matView[2][1]);\n forward = vec3(cc_matView[0][2], cc_matView[1][2], cc_matView[2][2]);\n return cc_matProj * (cc_matView * cc_matWorld) * pos;\n}\nvoid main() { gl_Position = vert(); }",
"frag": "\nprecision mediump float;\nmat3 transposeMat3 (mat3 v) {\n mat3 tmp;\n tmp[0] = vec3(v[0].x, v[1].x, v[2].x);\n tmp[1] = vec3(v[0].y, v[1].y, v[2].y);\n tmp[2] = vec3(v[0].z, v[1].z, v[2].z);\n return tmp;\n}\nvoid ClipQuadToHorizon (inout vec3 L[5], out int n) {\n int config = 0;\n if (L[0].z > 0.0) config += 1;\n if (L[1].z > 0.0) config += 2;\n if (L[2].z > 0.0) config += 4;\n if (L[3].z > 0.0) config += 8;\n config = 15;\n n = 0;\n if (config == 0)\n {\n }\n else if (config == 1) {\n n = 3;\n L[1] = -L[1].z * L[0] + L[0].z * L[1];\n L[2] = -L[3].z * L[0] + L[0].z * L[3];\n }\n else if (config == 2) {\n n = 3;\n L[0] = -L[0].z * L[1] + L[1].z * L[0];\n L[2] = -L[2].z * L[1] + L[1].z * L[2];\n }\n else if (config == 3) {\n n = 4;\n L[2] = -L[2].z * L[1] + L[1].z * L[2];\n L[3] = -L[3].z * L[0] + L[0].z * L[3];\n }\n else if (config == 4) {\n n = 3;\n L[0] = -L[3].z * L[2] + L[2].z * L[3];\n L[1] = -L[1].z * L[2] + L[2].z * L[1];\n }\n else if (config == 5) {\n n = 0;\n }\n else if (config == 6) {\n n = 4;\n L[0] = -L[0].z * L[1] + L[1].z * L[0];\n L[3] = -L[3].z * L[2] + L[2].z * L[3];\n }\n else if (config == 7) {\n n = 5;\n L[4] = -L[3].z * L[0] + L[0].z * L[3];\n L[3] = -L[3].z * L[2] + L[2].z * L[3];\n }\n else if (config == 8) {\n n = 3;\n L[0] = -L[0].z * L[3] + L[3].z * L[0];\n L[1] = -L[2].z * L[3] + L[3].z * L[2];\n L[2] = L[3];\n }\n else if (config == 9) {\n n = 4;\n L[1] = -L[1].z * L[0] + L[0].z * L[1];\n L[2] = -L[2].z * L[3] + L[3].z * L[2];\n }\n else if (config == 10) {\n n = 0;\n }\n else if (config == 11) {\n n = 5;\n L[4] = L[3];\n L[3] = -L[2].z * L[3] + L[3].z * L[2];\n L[2] = -L[2].z * L[1] + L[1].z * L[2];\n }\n else if (config == 12) {\n n = 4;\n L[1] = -L[1].z * L[2] + L[2].z * L[1];\n L[0] = -L[0].z * L[3] + L[3].z * L[0];\n }\n else if (config == 13) {\n n = 5;\n L[4] = L[3];\n L[3] = L[2];\n L[2] = -L[1].z * L[2] + L[2].z * L[1];\n L[1] = -L[1].z * L[0] + L[0].z * L[1];\n }\n else if (config == 14) {\n n = 5;\n L[4] = -L[0].z * L[3] + L[3].z * L[0];\n L[0] = -L[0].z * L[1] + L[1].z * L[0];\n }\n else if (config == 15) {\n n = 4;\n }\n if (n == 3) L[3] = L[0];\n if (n == 4) L[4] = L[0];\n}\nfloat IntegrateEdge (vec3 v1, vec3 v2) {\n float cosTheta = dot(v1, v2);\n float theta = acos(cosTheta);\n return cross(v1, v2).z * ((theta > 0.001) ? theta/sin(theta) : 4.0);\n}\nvec3 LTC_Evaluate (vec3 N, vec3 V, vec3 P, mat3 Minv, vec3 points[4]) {\n vec3 T1, T2;\n T1 = normalize(V - N*dot(V, N));\n T2 = cross(N, T1);\n Minv = Minv * transposeMat3(mat3(T1, T2, N));\n vec3 L[5];\n L[0] = Minv * (points[0] - P);\n L[1] = Minv * (points[1] - P);\n L[2] = Minv * (points[2] - P);\n L[3] = Minv * (points[3] - P);\n int n;\n ClipQuadToHorizon(L, n);\n if (n == 0) return vec3(0, 0, 0);\n L[0] = normalize(L[0]);\n L[1] = normalize(L[1]);\n L[2] = normalize(L[2]);\n L[3] = normalize(L[3]);\n L[4] = normalize(L[4]);\n float sum = 0.0;\n sum += IntegrateEdge(L[0], L[1]);\n sum += IntegrateEdge(L[1], L[2]);\n sum += IntegrateEdge(L[2], L[3]);\n if (n >= 4) sum += IntegrateEdge(L[3], L[4]);\n if (n == 5) sum += IntegrateEdge(L[4], L[0]);\n sum = max(0.0, sum);\n vec3 Lo_i = vec3(sum, sum, sum);\n return Lo_i;\n}\nlayout(std140) uniform CCGlobal {\n highp vec4 cc_time;\n mediump vec4 cc_screenSize;\n mediump vec4 cc_nativeSize;\n mediump vec4 cc_probeInfo;\n mediump vec4 cc_debug_view_mode;\n};\nlayout(std140) uniform CCCamera {\n highp mat4 cc_matView;\n highp mat4 cc_matViewInv;\n highp mat4 cc_matProj;\n highp mat4 cc_matProjInv;\n highp mat4 cc_matViewProj;\n highp mat4 cc_matViewProjInv;\n highp vec4 cc_cameraPos;\n mediump vec4 cc_surfaceTransform;\n mediump vec4 cc_screenScale;\n mediump vec4 cc_exposure;\n mediump vec4 cc_mainLitDir;\n mediump vec4 cc_mainLitColor;\n mediump vec4 cc_ambientSky;\n mediump vec4 cc_ambientGround;\n mediump vec4 cc_fogColor
},
"glsl1": {
"vert": "\nprecision mediump float;\nuniform highp mat4 cc_matWorld;\n uniform highp mat4 cc_matWorldIT;\nuniform highp mat4 cc_matView;\n uniform highp mat4 cc_matProj;\nattribute vec3 a_position;\nattribute vec3 a_normal;\nvarying vec3 normal_w;\nvarying vec3 pos_w;\nvarying vec3 pos_l;\nvarying vec3 right;\nvarying vec3 up;\nvarying vec3 forward;\nvec4 vert () {\n vec4 pos = vec4(a_position, 1);\n vec4 normal = vec4(a_normal, 0);\n pos_l = a_position;\n pos_w = (cc_matWorld * pos).xyz;\n normal_w = (cc_matWorldIT * normal).xyz;\n right = vec3(cc_matView[0][0], cc_matView[1][0], cc_matView[2][0]);\n up = vec3(cc_matView[0][1], cc_matView[1][1], cc_matView[2][1]);\n forward = vec3(cc_matView[0][2], cc_matView[1][2], cc_matView[2][2]);\n return cc_matProj * (cc_matView * cc_matWorld) * pos;\n}\nvoid main() { gl_Position = vert(); }",
"frag": "\nprecision mediump float;\nmat3 transposeMat3 (mat3 v) {\n mat3 tmp;\n tmp[0] = vec3(v[0].x, v[1].x, v[2].x);\n tmp[1] = vec3(v[0].y, v[1].y, v[2].y);\n tmp[2] = vec3(v[0].z, v[1].z, v[2].z);\n return tmp;\n}\nvoid ClipQuadToHorizon (inout vec3 L[5], out int n) {\n int config = 0;\n if (L[0].z > 0.0) config += 1;\n if (L[1].z > 0.0) config += 2;\n if (L[2].z > 0.0) config += 4;\n if (L[3].z > 0.0) config += 8;\n config = 15;\n n = 0;\n if (config == 0)\n {\n }\n else if (config == 1) {\n n = 3;\n L[1] = -L[1].z * L[0] + L[0].z * L[1];\n L[2] = -L[3].z * L[0] + L[0].z * L[3];\n }\n else if (config == 2) {\n n = 3;\n L[0] = -L[0].z * L[1] + L[1].z * L[0];\n L[2] = -L[2].z * L[1] + L[1].z * L[2];\n }\n else if (config == 3) {\n n = 4;\n L[2] = -L[2].z * L[1] + L[1].z * L[2];\n L[3] = -L[3].z * L[0] + L[0].z * L[3];\n }\n else if (config == 4) {\n n = 3;\n L[0] = -L[3].z * L[2] + L[2].z * L[3];\n L[1] = -L[1].z * L[2] + L[2].z * L[1];\n }\n else if (config == 5) {\n n = 0;\n }\n else if (config == 6) {\n n = 4;\n L[0] = -L[0].z * L[1] + L[1].z * L[0];\n L[3] = -L[3].z * L[2] + L[2].z * L[3];\n }\n else if (config == 7) {\n n = 5;\n L[4] = -L[3].z * L[0] + L[0].z * L[3];\n L[3] = -L[3].z * L[2] + L[2].z * L[3];\n }\n else if (config == 8) {\n n = 3;\n L[0] = -L[0].z * L[3] + L[3].z * L[0];\n L[1] = -L[2].z * L[3] + L[3].z * L[2];\n L[2] = L[3];\n }\n else if (config == 9) {\n n = 4;\n L[1] = -L[1].z * L[0] + L[0].z * L[1];\n L[2] = -L[2].z * L[3] + L[3].z * L[2];\n }\n else if (config == 10) {\n n = 0;\n }\n else if (config == 11) {\n n = 5;\n L[4] = L[3];\n L[3] = -L[2].z * L[3] + L[3].z * L[2];\n L[2] = -L[2].z * L[1] + L[1].z * L[2];\n }\n else if (config == 12) {\n n = 4;\n L[1] = -L[1].z * L[2] + L[2].z * L[1];\n L[0] = -L[0].z * L[3] + L[3].z * L[0];\n }\n else if (config == 13) {\n n = 5;\n L[4] = L[3];\n L[3] = L[2];\n L[2] = -L[1].z * L[2] + L[2].z * L[1];\n L[1] = -L[1].z * L[0] + L[0].z * L[1];\n }\n else if (config == 14) {\n n = 5;\n L[4] = -L[0].z * L[3] + L[3].z * L[0];\n L[0] = -L[0].z * L[1] + L[1].z * L[0];\n }\n else if (config == 15) {\n n = 4;\n }\n if (n == 3) L[3] = L[0];\n if (n == 4) L[4] = L[0];\n}\nfloat IntegrateEdge (vec3 v1, vec3 v2) {\n float cosTheta = dot(v1, v2);\n float theta = acos(cosTheta);\n return cross(v1, v2).z * ((theta > 0.001) ? theta/sin(theta) : 4.0);\n}\nvec3 LTC_Evaluate (vec3 N, vec3 V, vec3 P, mat3 Minv, vec3 points[4]) {\n vec3 T1, T2;\n T1 = normalize(V - N*dot(V, N));\n T2 = cross(N, T1);\n Minv = Minv * transposeMat3(mat3(T1, T2, N));\n vec3 L[5];\n L[0] = Minv * (points[0] - P);\n L[1] = Minv * (points[1] - P);\n L[2] = Minv * (points[2] - P);\n L[3] = Minv * (points[3] - P);\n int n;\n ClipQuadToHorizon(L, n);\n if (n == 0) return vec3(0, 0, 0);\n L[0] = normalize(L[0]);\n L[1] = normalize(L[1]);\n L[2] = normalize(L[2]);\n L[3] = normalize(L[3]);\n L[4] = normalize(L[4]);\n float sum = 0.0;\n sum += IntegrateEdge(L[0], L[1]);\n sum += IntegrateEdge(L[1], L[2]);\n sum += IntegrateEdge(L[2], L[3]);\n if (n >= 4) sum += IntegrateEdge(L[3], L[4]);\n if (n == 5) sum += IntegrateEdge(L[4], L[0]);\n sum = max(0.0, sum);\n vec3 Lo_i = vec3(sum, sum, sum);\n return Lo_i;\n}\nuniform mediump vec4 cc_debug_view_mode;\nuniform highp vec4 cc_cameraPos;\n uniform mediump vec4 cc_surfaceTransform;\n uniform mediump vec4 cc_exposure;\n#define CC_SURFACES_DEBUG_VIEW_VERTEX_COLOR 1\n#define CC_SURFACES_DEBUG_VIEW_VERTEX_NORMAL CC_SURFACES_DEBUG_VIEW_VERTEX_COLOR + 1\n#define CC_SURFACES_DEBUG_VIEW_VERTEX_TANGENT CC_SURFACES_DEBUG_VIEW_VERTEX_NORMAL + 1\n#define CC_SURFACES_DEBUG_VIEW_WORLD_POS CC_SURFACES_DEBUG_VIEW_VERTEX_TANGENT + 1\n#define CC_SURFACES_DEBUG_VIEW_VERTEX_MIRROR CC_SURFACES_DEBUG_VIEW_WORLD_POS + 1\n#define CC_SURFACES_DEBUG_VIEW_FACE_SIDE CC_SURFACES_DEBUG_VIEW_VERTEX_MIRROR + 1\n#define CC_SURFACES_DEBUG_VIEW_UV0 CC_SURFACES_DEBUG_VIEW_FACE_SID
},
"builtins": {
"globals": {
"blocks": [
{
"name": "CCGlobal",
"defines": []
},
{
"name": "CCCamera",
"defines": []
}
],
"samplerTextures": [],
"buffers": [],
"images": []
},
"locals": {
"blocks": [
{
"name": "CCLocal",
"defines": []
}
],
"samplerTextures": [],
"buffers": [],
"images": []
},
"statistics": {
"CC_EFFECT_USED_VERTEX_UNIFORM_VECTORS": 54,
"CC_EFFECT_USED_FRAGMENT_UNIFORM_VECTORS": 50
}
},
"defines": [
{
"name": "CC_USE_DEBUG_VIEW",
"type": "number",
"defines": [],
"range": [
0,
3
]
},
{
"name": "CC_SURFACES_ENABLE_DEBUG_VIEW",
"type": "boolean",
"defines": [
"CC_USE_DEBUG_VIEW",
"CC_SURFACES_DEBUG_VIEW_COMPOSITE_AND_MISC"
]
},
{
"name": "CC_USE_LIGHT_PROBE",
"type": "boolean",
"defines": [],
"default": 0
},
{
"name": "CC_USE_RGBE_OUTPUT",
"type": "boolean",
"defines": [
"CC_USE_LIGHT_PROBE"
]
},
{
"name": "CC_USE_FLOAT_OUTPUT",
"type": "boolean",
"defines": [
"CC_USE_LIGHT_PROBE",
"!CC_USE_RGBE_OUTPUT"
]
},
{
"name": "CC_USE_HDR",
"type": "boolean",
"defines": [
"CC_USE_LIGHT_PROBE",
"CC_USE_LIGHT_PROBE"
]
},
{
"name": "CC_TONE_MAPPING_TYPE",
"type": "number",
"defines": [
"CC_USE_HDR",
"CC_USE_LIGHT_PROBE",
"!CC_USE_RGBE_OUTPUT",
"!CC_USE_FLOAT_OUTPUT"
],
"range": [
0,
3
]
},
{
"name": "HDR_TONE_MAPPING_ACES",
"type": "boolean",
"defines": [
"CC_USE_HDR",
"CC_TONE_MAPPING_TYPE",
"CC_USE_LIGHT_PROBE",
"!CC_USE_RGBE_OUTPUT",
"!CC_USE_FLOAT_OUTPUT"
]
},
{
"name": "USE_INSTANCING",
"type": "boolean",
"defines": [
"CC_USE_LIGHT_PROBE",
"CC_USE_LIGHT_PROBE"
]
},
{
"name": "USE_FORWARD_PIPELINE",
"type": "boolean",
"defines": [
"CC_USE_LIGHT_PROBE"
]
}
],
"name": "internal/editor/light-probe-visualization|gizmo-vs:vert|gizmo-fs:back"
}
],
"combinations": [],
"hideInEditor": true
}