init
This commit is contained in:
@@ -0,0 +1,193 @@
|
||||
[
|
||||
{
|
||||
"__type__": "cc.Prefab",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_native": "",
|
||||
"data": {
|
||||
"__id__": 1
|
||||
},
|
||||
"optimizationPolicy": 0,
|
||||
"persistent": false
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "SM_Prop_Planter_01",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_parent": null,
|
||||
"_children": [
|
||||
{
|
||||
"__id__": 2
|
||||
}
|
||||
],
|
||||
"_active": true,
|
||||
"_components": [],
|
||||
"_prefab": {
|
||||
"__id__": 7
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"_lrot": {
|
||||
"__type__": "cc.Quat",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0,
|
||||
"w": 1
|
||||
},
|
||||
"_lscale": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 1,
|
||||
"y": 1,
|
||||
"z": 1
|
||||
},
|
||||
"_mobility": 0,
|
||||
"_layer": 1073741824,
|
||||
"_euler": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "SM_Prop_Planter_01",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_parent": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 3
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 6
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"_lrot": {
|
||||
"__type__": "cc.Quat",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0,
|
||||
"w": 1
|
||||
},
|
||||
"_lscale": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 1,
|
||||
"y": 1,
|
||||
"z": 1
|
||||
},
|
||||
"_mobility": 0,
|
||||
"_layer": 1073741824,
|
||||
"_euler": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.MeshRenderer",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 2
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 4
|
||||
},
|
||||
"_materials": [
|
||||
{
|
||||
"__uuid__": "452e1039-c299-4746-b189-0ac61a02afa4@51eea",
|
||||
"__expectedType__": "cc.Material"
|
||||
}
|
||||
],
|
||||
"_visFlags": 0,
|
||||
"bakeSettings": {
|
||||
"__id__": 5
|
||||
},
|
||||
"_mesh": {
|
||||
"__uuid__": "452e1039-c299-4746-b189-0ac61a02afa4@f46f3",
|
||||
"__expectedType__": "cc.Mesh"
|
||||
},
|
||||
"_shadowCastingMode": 0,
|
||||
"_shadowReceivingMode": 1,
|
||||
"_shadowBias": 0,
|
||||
"_shadowNormalBias": 0,
|
||||
"_reflectionProbeId": -1,
|
||||
"_reflectionProbeBlendId": -1,
|
||||
"_reflectionProbeBlendWeight": 0,
|
||||
"_enabledGlobalStandardSkinObject": false,
|
||||
"_enableMorph": true,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "e3ijpexE9cBI+rYSJ6Qepm"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.ModelBakeSettings",
|
||||
"texture": null,
|
||||
"uvParam": {
|
||||
"__type__": "cc.Vec4",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0,
|
||||
"w": 0
|
||||
},
|
||||
"_bakeable": false,
|
||||
"_castShadow": false,
|
||||
"_receiveShadow": false,
|
||||
"_recieveShadow": false,
|
||||
"_lightmapSize": 64,
|
||||
"_useLightProbe": false,
|
||||
"_bakeToLightProbe": true,
|
||||
"_reflectionProbeType": 0,
|
||||
"_bakeToReflectionProbe": true
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 1
|
||||
},
|
||||
"asset": {
|
||||
"__id__": 0
|
||||
},
|
||||
"fileId": "77evbXR7tWtroEDn1RWlKv",
|
||||
"instance": null,
|
||||
"targetOverrides": null,
|
||||
"nestedPrefabInstanceRoots": null
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 1
|
||||
},
|
||||
"asset": {
|
||||
"__id__": 0
|
||||
},
|
||||
"fileId": "dfbU7FmjVcM5lGjWQvJqrn",
|
||||
"instance": null,
|
||||
"targetOverrides": null,
|
||||
"nestedPrefabInstanceRoots": null
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,53 @@
|
||||
{
|
||||
"__type__": "cc.Material",
|
||||
"_name": "lambert30",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_native": "",
|
||||
"_effectAsset": {
|
||||
"__uuid__": "f648964e-8d32-41fc-9ac9-7a1e714dd17b",
|
||||
"__expectedType__": "cc.EffectAsset"
|
||||
},
|
||||
"_techIdx": 0,
|
||||
"_defines": [
|
||||
{
|
||||
"USE_ALBEDO_MAP": true,
|
||||
"DCC_APP_NAME": 5
|
||||
}
|
||||
],
|
||||
"_states": [
|
||||
{
|
||||
"rasterizerState": {},
|
||||
"blendState": {
|
||||
"targets": [
|
||||
{}
|
||||
]
|
||||
},
|
||||
"depthStencilState": {}
|
||||
}
|
||||
],
|
||||
"_props": [
|
||||
{
|
||||
"albedoScale": 0.800000011920929,
|
||||
"mainColor": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 255,
|
||||
"g": 255,
|
||||
"b": 255,
|
||||
"a": 255
|
||||
},
|
||||
"mainTexture": {
|
||||
"__uuid__": "452e1039-c299-4746-b189-0ac61a02afa4@664d0",
|
||||
"__expectedType__": "cc.Texture2D"
|
||||
},
|
||||
"emissiveScale": 1,
|
||||
"emissive": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 0,
|
||||
"g": 0,
|
||||
"b": 0,
|
||||
"a": 255
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"__type__": "cc.Texture2D",
|
||||
"content": {
|
||||
"base": "2,2,0,0,0,0",
|
||||
"mipmaps": [
|
||||
"0827a05d-0218-4f5f-bf3d-78871ef02c1e"
|
||||
]
|
||||
}
|
||||
}
|
||||
Binary file not shown.
@@ -0,0 +1,69 @@
|
||||
{
|
||||
"__type__": "cc.Mesh",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_native": ".bin",
|
||||
"_struct": {
|
||||
"primitives": [
|
||||
{
|
||||
"primitiveMode": 7,
|
||||
"vertexBundelIndices": [
|
||||
0
|
||||
],
|
||||
"indexView": {
|
||||
"offset": 8928,
|
||||
"length": 588,
|
||||
"count": 294,
|
||||
"stride": 2
|
||||
}
|
||||
}
|
||||
],
|
||||
"vertexBundles": [
|
||||
{
|
||||
"view": {
|
||||
"offset": 0,
|
||||
"length": 8928,
|
||||
"count": 186,
|
||||
"stride": 48
|
||||
},
|
||||
"attributes": [
|
||||
{
|
||||
"name": "a_position",
|
||||
"format": 32,
|
||||
"isNormalized": false
|
||||
},
|
||||
{
|
||||
"name": "a_normal",
|
||||
"format": 32,
|
||||
"isNormalized": false
|
||||
},
|
||||
{
|
||||
"name": "a_texCoord",
|
||||
"format": 21,
|
||||
"isNormalized": false
|
||||
},
|
||||
{
|
||||
"name": "a_tangent",
|
||||
"format": 44,
|
||||
"isNormalized": false
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"minPosition": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": -0.11381569504737854,
|
||||
"y": -0.10304253548383713,
|
||||
"z": -0.04702911525964737
|
||||
},
|
||||
"maxPosition": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0.11381568014621735,
|
||||
"y": 0.0637127235531807,
|
||||
"z": 0.04702949523925781
|
||||
}
|
||||
},
|
||||
"_hash": 4150764788,
|
||||
"_allowDataAccess": true
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"__type__": "cc.ImageAsset",
|
||||
"content": {
|
||||
"fmt": "0",
|
||||
"w": 0,
|
||||
"h": 0
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 2.0 KiB |
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"__type__": "cc.Texture2D",
|
||||
"content": {
|
||||
"base": "2,2,2,2,0,0",
|
||||
"mipmaps": [
|
||||
"45828f25-b50d-4c52-a591-e19491a62b8c"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,90 @@
|
||||
{
|
||||
"__type__": "cc.SpriteFrame",
|
||||
"content": {
|
||||
"name": "default_radio_button_on",
|
||||
"atlas": "",
|
||||
"rect": {
|
||||
"x": 1,
|
||||
"y": 1,
|
||||
"width": 30,
|
||||
"height": 30
|
||||
},
|
||||
"offset": {
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"originalSize": {
|
||||
"width": 32,
|
||||
"height": 32
|
||||
},
|
||||
"rotated": false,
|
||||
"capInsets": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"vertices": {
|
||||
"rawPosition": [
|
||||
-15,
|
||||
-15,
|
||||
0,
|
||||
15,
|
||||
-15,
|
||||
0,
|
||||
-15,
|
||||
15,
|
||||
0,
|
||||
15,
|
||||
15,
|
||||
0
|
||||
],
|
||||
"indexes": [
|
||||
0,
|
||||
1,
|
||||
2,
|
||||
2,
|
||||
1,
|
||||
3
|
||||
],
|
||||
"uv": [
|
||||
1,
|
||||
31,
|
||||
31,
|
||||
31,
|
||||
1,
|
||||
1,
|
||||
31,
|
||||
1
|
||||
],
|
||||
"nuv": [
|
||||
0.03125,
|
||||
0.03125,
|
||||
0.96875,
|
||||
0.03125,
|
||||
0.03125,
|
||||
0.96875,
|
||||
0.96875,
|
||||
0.96875
|
||||
],
|
||||
"minPos": {
|
||||
"x": -15,
|
||||
"y": -15,
|
||||
"z": 0
|
||||
},
|
||||
"maxPos": {
|
||||
"x": 15,
|
||||
"y": 15,
|
||||
"z": 0
|
||||
}
|
||||
},
|
||||
"texture": "45828f25-b50d-4c52-a591-e19491a62b8c@6c48a",
|
||||
"packable": true,
|
||||
"pixelsToUnit": 100,
|
||||
"pivot": {
|
||||
"x": 0.5,
|
||||
"y": 0.5
|
||||
},
|
||||
"meshType": 0
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
import { _decorator, Component, Node, RenderFlow } from "cc";
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@ccclass("<%UnderscoreCaseClassName%>")
|
||||
export class <%UnderscoreCaseClassName%> extends RenderFlow {
|
||||
|
||||
rebuild() {
|
||||
|
||||
}
|
||||
|
||||
destroy() {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"__type__": "cc.Asset",
|
||||
"_name": "ts-render-flow",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_native": ""
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"__type__": "cc.ImageAsset",
|
||||
"content": {
|
||||
"fmt": "0",
|
||||
"w": 0,
|
||||
"h": 0
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 3.7 KiB |
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"__type__": "cc.Texture2D",
|
||||
"content": {
|
||||
"base": "2,2,2,2,1,0",
|
||||
"mipmaps": [
|
||||
"45a307d7-6e6b-4a94-9926-bc900a31e963"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,90 @@
|
||||
{
|
||||
"__type__": "cc.SpriteFrame",
|
||||
"content": {
|
||||
"name": "FX_Fire_Font4",
|
||||
"atlas": "",
|
||||
"rect": {
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"width": 261,
|
||||
"height": 86
|
||||
},
|
||||
"offset": {
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"originalSize": {
|
||||
"width": 261,
|
||||
"height": 86
|
||||
},
|
||||
"rotated": false,
|
||||
"capInsets": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"vertices": {
|
||||
"rawPosition": [
|
||||
-130.5,
|
||||
-43,
|
||||
0,
|
||||
130.5,
|
||||
-43,
|
||||
0,
|
||||
-130.5,
|
||||
43,
|
||||
0,
|
||||
130.5,
|
||||
43,
|
||||
0
|
||||
],
|
||||
"indexes": [
|
||||
0,
|
||||
1,
|
||||
2,
|
||||
2,
|
||||
1,
|
||||
3
|
||||
],
|
||||
"uv": [
|
||||
0,
|
||||
86,
|
||||
261,
|
||||
86,
|
||||
0,
|
||||
0,
|
||||
261,
|
||||
0
|
||||
],
|
||||
"nuv": [
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
1,
|
||||
1
|
||||
],
|
||||
"minPos": {
|
||||
"x": -130.5,
|
||||
"y": -43,
|
||||
"z": 0
|
||||
},
|
||||
"maxPos": {
|
||||
"x": 130.5,
|
||||
"y": 43,
|
||||
"z": 0
|
||||
}
|
||||
},
|
||||
"texture": "45a307d7-6e6b-4a94-9926-bc900a31e963@6c48a",
|
||||
"packable": true,
|
||||
"pixelsToUnit": 100,
|
||||
"pivot": {
|
||||
"x": 0.5,
|
||||
"y": 0.5
|
||||
},
|
||||
"meshType": 0
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"__type__": "cc.ImageAsset",
|
||||
"content": {
|
||||
"fmt": "0",
|
||||
"w": 0,
|
||||
"h": 0
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 2.9 KiB |
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"__type__": "cc.Texture2D",
|
||||
"content": {
|
||||
"base": "2,2,2,2,1,0",
|
||||
"mipmaps": [
|
||||
"45df586c-ea63-4520-87bd-2a27a00a9122"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,90 @@
|
||||
{
|
||||
"__type__": "cc.SpriteFrame",
|
||||
"content": {
|
||||
"name": "BTN_Restart",
|
||||
"atlas": "",
|
||||
"rect": {
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"width": 158,
|
||||
"height": 133
|
||||
},
|
||||
"offset": {
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"originalSize": {
|
||||
"width": 158,
|
||||
"height": 133
|
||||
},
|
||||
"rotated": false,
|
||||
"capInsets": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"vertices": {
|
||||
"rawPosition": [
|
||||
-79,
|
||||
-66.5,
|
||||
0,
|
||||
79,
|
||||
-66.5,
|
||||
0,
|
||||
-79,
|
||||
66.5,
|
||||
0,
|
||||
79,
|
||||
66.5,
|
||||
0
|
||||
],
|
||||
"indexes": [
|
||||
0,
|
||||
1,
|
||||
2,
|
||||
2,
|
||||
1,
|
||||
3
|
||||
],
|
||||
"uv": [
|
||||
0,
|
||||
133,
|
||||
158,
|
||||
133,
|
||||
0,
|
||||
0,
|
||||
158,
|
||||
0
|
||||
],
|
||||
"nuv": [
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
1,
|
||||
1
|
||||
],
|
||||
"minPos": {
|
||||
"x": -79,
|
||||
"y": -66.5,
|
||||
"z": 0
|
||||
},
|
||||
"maxPos": {
|
||||
"x": 79,
|
||||
"y": 66.5,
|
||||
"z": 0
|
||||
}
|
||||
},
|
||||
"texture": "45df586c-ea63-4520-87bd-2a27a00a9122@6c48a",
|
||||
"packable": true,
|
||||
"pixelsToUnit": 100,
|
||||
"pivot": {
|
||||
"x": 0.5,
|
||||
"y": 0.5
|
||||
},
|
||||
"meshType": 0
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,158 @@
|
||||
{
|
||||
"__type__": "cc.EffectAsset",
|
||||
"_name": "pipeline/cluster-build",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_native": "",
|
||||
"techniques": [
|
||||
{
|
||||
"name": "opaque",
|
||||
"passes": [
|
||||
{
|
||||
"pass": "cluster-build-cs",
|
||||
"program": "pipeline/cluster-build|cluster-main"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"shaders": [
|
||||
{
|
||||
"blocks": [],
|
||||
"samplerTextures": [],
|
||||
"samplers": [],
|
||||
"textures": [],
|
||||
"buffers": [],
|
||||
"images": [],
|
||||
"subpassInputs": [],
|
||||
"attributes": [],
|
||||
"varyings": [],
|
||||
"fragColors": [],
|
||||
"descriptors": [
|
||||
{
|
||||
"rate": 0,
|
||||
"blocks": [],
|
||||
"samplerTextures": [],
|
||||
"samplers": [],
|
||||
"textures": [],
|
||||
"buffers": [],
|
||||
"images": [],
|
||||
"subpassInputs": []
|
||||
},
|
||||
{
|
||||
"rate": 1,
|
||||
"blocks": [],
|
||||
"samplerTextures": [],
|
||||
"samplers": [],
|
||||
"textures": [],
|
||||
"buffers": [],
|
||||
"images": [],
|
||||
"subpassInputs": []
|
||||
},
|
||||
{
|
||||
"rate": 2,
|
||||
"blocks": [],
|
||||
"samplerTextures": [],
|
||||
"samplers": [],
|
||||
"textures": [],
|
||||
"buffers": [],
|
||||
"images": [],
|
||||
"subpassInputs": []
|
||||
},
|
||||
{
|
||||
"rate": 3,
|
||||
"blocks": [
|
||||
{
|
||||
"tags": {},
|
||||
"name": "CCConst",
|
||||
"members": [
|
||||
{
|
||||
"name": "cc_nearFar",
|
||||
"typename": "vec4",
|
||||
"type": 16,
|
||||
"count": 1
|
||||
},
|
||||
{
|
||||
"name": "cc_viewPort",
|
||||
"typename": "vec4",
|
||||
"type": 16,
|
||||
"count": 1
|
||||
},
|
||||
{
|
||||
"name": "cc_workGroup",
|
||||
"typename": "vec4",
|
||||
"type": 16,
|
||||
"count": 1
|
||||
},
|
||||
{
|
||||
"name": "cc_matView",
|
||||
"typename": "mat4",
|
||||
"type": 25,
|
||||
"count": 1
|
||||
},
|
||||
{
|
||||
"name": "cc_matProjInv",
|
||||
"typename": "mat4",
|
||||
"type": 25,
|
||||
"count": 1
|
||||
}
|
||||
],
|
||||
"defines": [],
|
||||
"stageFlags": 32,
|
||||
"rate": 3
|
||||
}
|
||||
],
|
||||
"samplerTextures": [],
|
||||
"samplers": [],
|
||||
"textures": [],
|
||||
"buffers": [
|
||||
{
|
||||
"name": "b_clustersBuffer",
|
||||
"memoryAccess": 3,
|
||||
"defines": [],
|
||||
"stageFlags": 32,
|
||||
"binding": 0
|
||||
}
|
||||
],
|
||||
"images": [],
|
||||
"subpassInputs": []
|
||||
}
|
||||
],
|
||||
"hash": 2050688826,
|
||||
"glsl4": {
|
||||
"compute": "\n#if defined(CC_USE_METAL) || defined(CC_USE_WGPU)\n#define CC_HANDLE_SAMPLE_NDC_FLIP_STATIC(y) y = -y\n#else\n#define CC_HANDLE_SAMPLE_NDC_FLIP_STATIC(y)\n#endif\nprecision highp float;\n#define LOCAL_SIZE_X 16u\n#define LOCAL_SIZE_Y 8u\n#define LOCAL_SIZE_Z 1u\nlayout (local_size_x = LOCAL_SIZE_X, local_size_y = LOCAL_SIZE_Y, local_size_z = LOCAL_SIZE_Z) in;\nlayout(std140) uniform CCConst {\n vec4 cc_nearFar;\n vec4 cc_viewPort;\n vec4 cc_workGroup;\n mat4 cc_matView;\n mat4 cc_matProjInv;\n};\nlayout(std430, set = 1, binding = 0) buffer b_clustersBuffer { vec4 b_clusters[]; };\nvec4 screen2Eye(vec4 coord) {\n vec3 ndc = vec3(\n 2.0 * (coord.x - cc_viewPort.x) / cc_viewPort.z - 1.0,\n 2.0 * (coord.y - cc_viewPort.y) / cc_viewPort.w - 1.0,\n 2.0 * coord.z - 1.0);\n CC_HANDLE_SAMPLE_NDC_FLIP_STATIC(ndc.y);\n vec4 eye = ((cc_matProjInv) * (vec4(ndc, 1.0)));\n eye = eye / eye.w;\n return eye;\n}\nvoid main () {\n uint clusterIndex = gl_GlobalInvocationID.z * gl_WorkGroupSize.x * gl_WorkGroupSize.y +\n gl_GlobalInvocationID.y * gl_WorkGroupSize.x +\n gl_GlobalInvocationID.x;\n float clusterSizeX = ceil(cc_viewPort.z / cc_workGroup.x);\n float clusterSizeY = ceil(cc_viewPort.w / cc_workGroup.y);\n vec4 minScreen = vec4(vec2(gl_GlobalInvocationID.xy) * vec2(clusterSizeX, clusterSizeY), 1.0, 1.0);\n vec4 maxScreen = vec4(vec2(gl_GlobalInvocationID.xy + uvec2(1, 1)) * vec2(clusterSizeX, clusterSizeY), 1.0, 1.0);\n vec3 minEye = screen2Eye(minScreen).xyz;\n vec3 maxEye = screen2Eye(maxScreen).xyz;\n float clusterNear = -cc_nearFar.x * pow(cc_nearFar.y / cc_nearFar.x, float(gl_GlobalInvocationID.z) / cc_workGroup.z);\n float clusterFar = -cc_nearFar.x * pow(cc_nearFar.y / cc_nearFar.x, float(gl_GlobalInvocationID.z + 1u) / cc_workGroup.z);\n vec3 minNear = minEye * clusterNear / minEye.z;\n vec3 minFar = minEye * clusterFar / minEye.z;\n vec3 maxNear = maxEye * clusterNear / maxEye.z;\n vec3 maxFar = maxEye * clusterFar / maxEye.z;\n vec3 minBounds = min(min(minNear, minFar), min(maxNear, maxFar));\n vec3 maxBounds = max(max(minNear, minFar), max(maxNear, maxFar));\n b_clusters[2u * clusterIndex + 0u] = vec4(minBounds, 1.0);\n b_clusters[2u * clusterIndex + 1u] = vec4(maxBounds, 1.0);\n}"
|
||||
},
|
||||
"glsl3": {
|
||||
"compute": "\n#if defined(CC_USE_METAL) || defined(CC_USE_WGPU)\n#define CC_HANDLE_SAMPLE_NDC_FLIP_STATIC(y) y = -y\n#else\n#define CC_HANDLE_SAMPLE_NDC_FLIP_STATIC(y)\n#endif\nprecision highp float;\n#define LOCAL_SIZE_X 16u\n#define LOCAL_SIZE_Y 8u\n#define LOCAL_SIZE_Z 1u\nlayout (local_size_x = LOCAL_SIZE_X, local_size_y = LOCAL_SIZE_Y, local_size_z = LOCAL_SIZE_Z) in;\nlayout(std140) uniform CCConst {\n vec4 cc_nearFar;\n vec4 cc_viewPort;\n vec4 cc_workGroup;\n mat4 cc_matView;\n mat4 cc_matProjInv;\n};\nlayout(std430) buffer b_clustersBuffer { vec4 b_clusters[]; };\nvec4 screen2Eye(vec4 coord) {\n vec3 ndc = vec3(\n 2.0 * (coord.x - cc_viewPort.x) / cc_viewPort.z - 1.0,\n 2.0 * (coord.y - cc_viewPort.y) / cc_viewPort.w - 1.0,\n 2.0 * coord.z - 1.0);\n CC_HANDLE_SAMPLE_NDC_FLIP_STATIC(ndc.y);\n vec4 eye = ((cc_matProjInv) * (vec4(ndc, 1.0)));\n eye = eye / eye.w;\n return eye;\n}\nvoid main () {\n uint clusterIndex = gl_GlobalInvocationID.z * gl_WorkGroupSize.x * gl_WorkGroupSize.y +\n gl_GlobalInvocationID.y * gl_WorkGroupSize.x +\n gl_GlobalInvocationID.x;\n float clusterSizeX = ceil(cc_viewPort.z / cc_workGroup.x);\n float clusterSizeY = ceil(cc_viewPort.w / cc_workGroup.y);\n vec4 minScreen = vec4(vec2(gl_GlobalInvocationID.xy) * vec2(clusterSizeX, clusterSizeY), 1.0, 1.0);\n vec4 maxScreen = vec4(vec2(gl_GlobalInvocationID.xy + uvec2(1, 1)) * vec2(clusterSizeX, clusterSizeY), 1.0, 1.0);\n vec3 minEye = screen2Eye(minScreen).xyz;\n vec3 maxEye = screen2Eye(maxScreen).xyz;\n float clusterNear = -cc_nearFar.x * pow(cc_nearFar.y / cc_nearFar.x, float(gl_GlobalInvocationID.z) / cc_workGroup.z);\n float clusterFar = -cc_nearFar.x * pow(cc_nearFar.y / cc_nearFar.x, float(gl_GlobalInvocationID.z + 1u) / cc_workGroup.z);\n vec3 minNear = minEye * clusterNear / minEye.z;\n vec3 minFar = minEye * clusterFar / minEye.z;\n vec3 maxNear = maxEye * clusterNear / maxEye.z;\n vec3 maxFar = maxEye * clusterFar / maxEye.z;\n vec3 minBounds = min(min(minNear, minFar), min(maxNear, maxFar));\n vec3 maxBounds = max(max(minNear, minFar), max(maxNear, maxFar));\n b_clusters[2u * clusterIndex + 0u] = vec4(minBounds, 1.0);\n b_clusters[2u * clusterIndex + 1u] = vec4(maxBounds, 1.0);\n}"
|
||||
},
|
||||
"glsl1": {
|
||||
"compute": ""
|
||||
},
|
||||
"builtins": {
|
||||
"globals": {
|
||||
"blocks": [
|
||||
{
|
||||
"name": "CCConst",
|
||||
"defines": []
|
||||
}
|
||||
],
|
||||
"samplerTextures": [],
|
||||
"buffers": [],
|
||||
"images": []
|
||||
},
|
||||
"locals": {
|
||||
"blocks": [],
|
||||
"samplerTextures": [],
|
||||
"buffers": [],
|
||||
"images": []
|
||||
},
|
||||
"statistics": {
|
||||
"CC_EFFECT_USED_COMPUTE_UNIFORM_VECTORS": 11
|
||||
}
|
||||
},
|
||||
"defines": [],
|
||||
"name": "pipeline/cluster-build|cluster-main"
|
||||
}
|
||||
],
|
||||
"combinations": [],
|
||||
"hideInEditor": false
|
||||
}
|
||||
Reference in New Issue
Block a user