Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
TNGD_CaveCruiser
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
SparkProjects
TNGD_CaveCruiser
Commits
c0575648
Commit
c0575648
authored
Sep 11, 2024
by
haiyoucuv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
上传
parent
c99b7986
Changes
13
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
262 additions
and
594 deletions
+262
-594
MainGame.scene
assets/Bundles/MainGame/MainGame.scene
+251
-294
MotionBlur.meta
assets/Component/MotionBlur.meta
+0
-9
MotionBlurPass.ts
assets/Component/MotionBlur/MotionBlurPass.ts
+0
-72
MotionBlurPass.ts.meta
assets/Component/MotionBlur/MotionBlurPass.ts.meta
+0
-9
MotionBlurSetting.ts
assets/Component/MotionBlur/MotionBlurSetting.ts
+0
-26
MotionBlurSetting.ts.meta
assets/Component/MotionBlur/MotionBlurSetting.ts.meta
+0
-9
normal.effect
assets/Component/MotionBlur/normal.effect
+0
-112
normal.effect.meta
assets/Component/MotionBlur/normal.effect.meta
+0
-11
normal.mtl
assets/Component/MotionBlur/normal.mtl
+0
-29
normal.mtl.meta
assets/Component/MotionBlur/normal.mtl.meta
+0
-11
index.html
build/web-mobile/index.html
+9
-9
engine.json
settings/v2/packages/engine.json
+1
-2
project.json
settings/v2/packages/project.json
+1
-1
No files found.
assets/Bundles/MainGame/MainGame.scene
View file @
c0575648
This diff is collapsed.
Click to expand it.
assets/Component/MotionBlur.meta
deleted
100644 → 0
View file @
c99b7986
{
"ver": "1.2.0",
"importer": "directory",
"imported": true,
"uuid": "08b393f4-00f7-4c9b-b3a6-13f3933244f5",
"files": [],
"subMetas": {},
"userData": {}
}
assets/Component/MotionBlur/MotionBlurPass.ts
deleted
100644 → 0
View file @
c99b7986
import
{
Vec4
,
gfx
,
postProcess
,
renderer
,
rendering
}
from
"cc"
;
import
{
MotionBlurSetting
}
from
"./MotionBlurSetting"
;
export
class
MotionBlurPass
extends
postProcess
.
SettingPass
{
// custom pass name
name
=
'CustomPass'
// out out slot name
outputNames
:
string
[]
=
[
'CustomPassColor'
]
// reference to post process setting
get
setting
()
{
return
this
.
getSetting
(
MotionBlurSetting
);
}
// Whether the pass should rendered
checkEnable
(
camera
:
renderer
.
scene
.
Camera
):
boolean
{
let
setting
=
this
.
setting
;
return
setting
.
material
&&
super
.
checkEnable
(
camera
);
}
params
=
new
Vec4
render
(
camera
:
renderer
.
scene
.
Camera
,
ppl
:
rendering
.
Pipeline
)
{
const
cameraID
=
this
.
getCameraUniqueID
(
camera
);
// clear background to black color
const
context
=
this
.
context
;
context
.
clearBlack
()
// input name from last pass's output slot 0
const
input0
=
this
.
lastPass
.
slotName
(
camera
,
0
);
// output slot 0 name
const
output
=
this
.
slotName
(
camera
,
0
);
// get depth slot name
const
depth
=
context
.
depthSlotName
;
// also can get depth slot name from forward pass.
// let forwardPass = builder.getPass(ForwardPass);
// depth = forwardPass.slotName(camera, 1);
// set setting value to material
const
setting
=
this
.
setting
;
// this.params.x = setting.blueIntensity
// this.params.y = setting.showDepth ? 1 : 0;
// this.params.z = setting.depthRange;
// setting.material.setProperty('params', this.params);
context
.
material
=
setting
.
material
;
context
// update view port
.
updatePassViewPort
()
// add a render pass
.
addRenderPass
(
'post-process'
,
`
${
this
.
name
}${
cameraID
}
`
)
// set inputs
.
setPassInput
(
input0
,
'inputTexture'
)
.
setPassInput
(
depth
,
'depthTexture'
)
// set outputs
.
addRasterView
(
output
,
gfx
.
Format
.
RGBA8
)
// final render
.
blitScreen
(
0
)
// calculate a version
.
version
();
}
}
let
builder
=
rendering
.
getCustomPipeline
(
'Custom'
)
as
postProcess
.
PostProcessBuilder
;
if
(
builder
)
{
// insert CustomPass after a BlitScreenPass
builder
.
insertPass
(
new
MotionBlurPass
(),
postProcess
.
BlitScreenPass
);
}
\ No newline at end of file
assets/Component/MotionBlur/MotionBlurPass.ts.meta
deleted
100644 → 0
View file @
c99b7986
{
"ver": "4.0.24",
"importer": "typescript",
"imported": true,
"uuid": "12640f6d-b2f9-49e6-ac3e-b467b2c2afc9",
"files": [],
"subMetas": {},
"userData": {}
}
assets/Component/MotionBlur/MotionBlurSetting.ts
deleted
100644 → 0
View file @
c99b7986
import
{
_decorator
,
Material
,
postProcess
}
from
'cc'
;
const
{
ccclass
,
property
,
menu
}
=
_decorator
;
@
ccclass
(
'MotionBlurSetting'
)
@
menu
(
'PostProcess/MotionBlurSetting'
)
export
class
MotionBlurSetting
extends
postProcess
.
PostProcessSetting
{
@
property
blueIntensity
=
1
@
property
showDepth
=
false
@
property
depthRange
=
30
@
property
(
Material
)
_material
:
Material
|
undefined
@
property
(
Material
)
get
material
()
{
return
this
.
_material
;
}
set
material
(
v
)
{
this
.
_material
=
v
;
}
}
\ No newline at end of file
assets/Component/MotionBlur/MotionBlurSetting.ts.meta
deleted
100644 → 0
View file @
c99b7986
{
"ver": "4.0.24",
"importer": "typescript",
"imported": true,
"uuid": "254e958b-6382-46fe-bce4-41d0409a40f4",
"files": [],
"subMetas": {},
"userData": {}
}
assets/Component/MotionBlur/normal.effect
deleted
100644 → 0
View file @
c99b7986
CCEffect %{
techniques:
- passes:
- vert: post-process-vs
frag: post-process-fs
pass: post-process
depthStencilState:
depthTest: false
depthWrite: false
rasterizerState:
cullMode: none
blendState:
targets:
- blend: true
blendSrc: src_alpha
blendDst: one_minus_src_alpha
blendSrcAlpha: src_alpha
blendDstAlpha: one_minus_src_alpha
properties:
outlineTexture: { value: black }
blendIntensity: { value: 0.5 }
outlineColor: { value: [ 0, 0, 0, 1 ], editor: { type: color } }
outlineWidth: { value: 0.1 }
}%
CCProgram post-process-vs %{
precision highp float;
#include <legacy/decode-standard>
#include <builtin/uniforms/cc-global>
#include <common/common-define>
out vec2 v_uv;
void main () {
StandardVertInput In;
CCDecode(In);
CC_HANDLE_GET_CLIP_FLIP(In.position.xy);
gl_Position = In.position;
v_uv = a_texCoord;
}
}%
CCProgram ubo %{
uniform PostUBO {
vec4 outlineColor;
float blendIntensity;
float outlineWidth;
};
uniform sampler2D outlineTexture;
#pragma rate inputTexture pass
uniform sampler2D inputTexture;
#pragma rate depthTexture pass
uniform sampler2D depthTexture;
}%
CCProgram post-process-fs %{
precision highp float;
#include <builtin/uniforms/cc-global>
in vec2 v_uv;
#include <ubo>
layout(location = 0) out vec4 fragColor;
vec3 normal_from_depth(float depth, vec2 texcoords) {
const vec2 offset1 = vec2(0.0,0.001);
const vec2 offset2 = vec2(0.001,0.0);
float depth1 = texture(depthTexture, texcoords + offset1).r;
float depth2 = texture(depthTexture, texcoords + offset2).r;
vec3 p1 = vec3(offset1, depth1 - depth);
vec3 p2 = vec3(offset2, depth2 - depth);
vec3 normal = cross(p1, p2);
normal.z = -normal.z;
return normalize(normal);
}
void main () {
vec4 color = texture(inputTexture, v_uv);
vec4 outline = texture(outlineTexture, v_uv);
float depth = texture(depthTexture, v_uv).r;
float sizeX = outlineWidth * 1.0 / cc_screenSize.x;
float sizeY = outlineWidth * 1.0 / cc_screenSize.y;
float alpha = -8.0 * outline.a;
alpha += texture(outlineTexture, v_uv + vec2(0.0, -sizeY)).a;
alpha += texture(outlineTexture, v_uv + vec2(sizeX, -sizeY)).a;
alpha += texture(outlineTexture, v_uv + vec2(sizeX, 0)).a;
alpha += texture(outlineTexture, v_uv + vec2(sizeX, sizeY)).a;
alpha += texture(outlineTexture, v_uv + vec2(0.0, sizeY)).a;
alpha += texture(outlineTexture, v_uv + vec2(-sizeX, sizeY)).a;
alpha += texture(outlineTexture, v_uv + vec2(-sizeX, 0.0)).a;
alpha += texture(outlineTexture, v_uv + vec2(-sizeX, -sizeY)).a;
vec4 final_color = mix(color, outlineColor, clamp(alpha, 0.0, 1.0));
fragColor = vec4(final_color.rgb, clamp(abs(alpha) + outline.a, 0.0, 1.0));
fragColor = final_color;
vec3 normal = normal_from_depth(depth, v_uv);
fragColor = vec4(normal, 1.0);
}
}%
assets/Component/MotionBlur/normal.effect.meta
deleted
100644 → 0
View file @
c99b7986
{
"ver": "1.7.1",
"importer": "effect",
"imported": true,
"uuid": "1ff0a4be-fc26-4582-978f-ee433132e2b8",
"files": [
".json"
],
"subMetas": {},
"userData": {}
}
assets/Component/MotionBlur/normal.mtl
deleted
100644 → 0
View file @
c99b7986
{
"__type__": "cc.Material",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"_native": "",
"_effectAsset": {
"__uuid__": "1ff0a4be-fc26-4582-978f-ee433132e2b8",
"__expectedType__": "cc.EffectAsset"
},
"_techIdx": 0,
"_defines": [
{}
],
"_states": [
{
"rasterizerState": {},
"depthStencilState": {},
"blendState": {
"targets": [
{}
]
}
}
],
"_props": [
{}
]
}
\ No newline at end of file
assets/Component/MotionBlur/normal.mtl.meta
deleted
100644 → 0
View file @
c99b7986
{
"ver": "1.0.21",
"importer": "material",
"imported": true,
"uuid": "c6d6a624-7ee7-4ac7-b72b-59995211cdb5",
"files": [
".json"
],
"subMetas": {},
"userData": {}
}
build/web-mobile/index.html
View file @
c0575648
...
@@ -33,12 +33,12 @@
...
@@ -33,12 +33,12 @@
<!--<link rel="apple-touch-icon" href=".png" />-->
<!--<link rel="apple-touch-icon" href=".png" />-->
<!--<link rel="apple-touch-icon-precomposed" href=".png" />-->
<!--<link rel="apple-touch-icon-precomposed" href=".png" />-->
<script
src=
"//duiba-credits-test.oss-cn-hangzhou.aliyuncs.com/TNGD_GAMES/Cave_Cruiser/17260
34425115
/src/assets/plugin/zepto.min.js"
></script>
<script
src=
"//duiba-credits-test.oss-cn-hangzhou.aliyuncs.com/TNGD_GAMES/Cave_Cruiser/17260
57349058
/src/assets/plugin/zepto.min.js"
></script>
<script
src=
"//duiba-credits-test.oss-cn-hangzhou.aliyuncs.com/TNGD_GAMES/Cave_Cruiser/17260
34425115
/src/assets/plugin/declare-process.js"
></script>
<script
src=
"//duiba-credits-test.oss-cn-hangzhou.aliyuncs.com/TNGD_GAMES/Cave_Cruiser/17260
57349058
/src/assets/plugin/declare-process.js"
></script>
<script
src=
"//duiba-credits-test.oss-cn-hangzhou.aliyuncs.com/TNGD_GAMES/Cave_Cruiser/17260
34425115
/src/assets/plugin/SVGA.Lite.v2.1.1.js"
></script>
<script
src=
"//duiba-credits-test.oss-cn-hangzhou.aliyuncs.com/TNGD_GAMES/Cave_Cruiser/17260
57349058
/src/assets/plugin/SVGA.Lite.v2.1.1.js"
></script>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"//duiba-credits-test.oss-cn-hangzhou.aliyuncs.com/TNGD_GAMES/Cave_Cruiser/17260
34425115
/style.css"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"//duiba-credits-test.oss-cn-hangzhou.aliyuncs.com/TNGD_GAMES/Cave_Cruiser/17260
57349058
/style.css"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"//duiba-credits-test.oss-cn-hangzhou.aliyuncs.com/TNGD_GAMES/Cave_Cruiser/17260
34425115
/custom.css"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"//duiba-credits-test.oss-cn-hangzhou.aliyuncs.com/TNGD_GAMES/Cave_Cruiser/17260
57349058
/custom.css"
/>
<script
type=
"text/javascript"
src=
"https://appx/web-view.min.js"
></script>
<script
type=
"text/javascript"
src=
"https://appx/web-view.min.js"
></script>
...
@@ -51,16 +51,16 @@
...
@@ -51,16 +51,16 @@
</div>
</div>
<!-- Polyfills bundle. -->
<!-- Polyfills bundle. -->
<script
src=
"//duiba-credits-test.oss-cn-hangzhou.aliyuncs.com/TNGD_GAMES/Cave_Cruiser/17260
34425115
/src/polyfills.bundle.js"
charset=
"utf-8"
></script>
<script
src=
"//duiba-credits-test.oss-cn-hangzhou.aliyuncs.com/TNGD_GAMES/Cave_Cruiser/17260
57349058
/src/polyfills.bundle.js"
charset=
"utf-8"
></script>
<!-- SystemJS support. -->
<!-- SystemJS support. -->
<script
src=
"//duiba-credits-test.oss-cn-hangzhou.aliyuncs.com/TNGD_GAMES/Cave_Cruiser/17260
34425115
/src/system.bundle.js"
charset=
"utf-8"
></script>
<script
src=
"//duiba-credits-test.oss-cn-hangzhou.aliyuncs.com/TNGD_GAMES/Cave_Cruiser/17260
57349058
/src/system.bundle.js"
charset=
"utf-8"
></script>
<!-- Import map -->
<!-- Import map -->
<script
src=
"//duiba-credits-test.oss-cn-hangzhou.aliyuncs.com/TNGD_GAMES/Cave_Cruiser/17260
34425115
/src/import-map.json"
type=
"systemjs-importmap"
charset=
"utf-8"
></script>
<script
src=
"//duiba-credits-test.oss-cn-hangzhou.aliyuncs.com/TNGD_GAMES/Cave_Cruiser/17260
57349058
/src/import-map.json"
type=
"systemjs-importmap"
charset=
"utf-8"
></script>
<script>
<script>
System
.
import
(
'//duiba-credits-test.oss-cn-hangzhou.aliyuncs.com/TNGD_GAMES/Cave_Cruiser/17260
34425115
/index.js'
).
catch
(
function
(
err
)
{
System
.
import
(
'//duiba-credits-test.oss-cn-hangzhou.aliyuncs.com/TNGD_GAMES/Cave_Cruiser/17260
57349058
/index.js'
).
catch
(
function
(
err
)
{
console
.
error
(
err
);
console
.
error
(
err
);
})
})
</script>
</script>
...
...
settings/v2/packages/engine.json
View file @
c0575648
...
@@ -122,7 +122,7 @@
...
@@ -122,7 +122,7 @@
"_value"
:
true
"_value"
:
true
},
},
"custom-pipeline"
:
{
"custom-pipeline"
:
{
"_value"
:
tru
e
"_value"
:
fals
e
},
},
"graphcis"
:
{
"graphcis"
:
{
"_value"
:
true
"_value"
:
true
...
@@ -137,7 +137,6 @@
...
@@ -137,7 +137,6 @@
"3d"
,
"3d"
,
"animation"
,
"animation"
,
"base"
,
"base"
,
"custom-pipeline"
,
"debug-renderer"
,
"debug-renderer"
,
"geometry-renderer"
,
"geometry-renderer"
,
"gfx-webgl"
,
"gfx-webgl"
,
...
...
settings/v2/packages/project.json
View file @
c0575648
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
"height"
:
1624
"height"
:
1624
},
},
"downloadMaxConcurrency"
:
20
,
"downloadMaxConcurrency"
:
20
,
"renderPipeline"
:
"
fd8ec536-a354-4a17-9c74-4f3883c378c8
"
"renderPipeline"
:
"
c7e748e8-be82-4f6f-b2c0-085b604e40e5
"
},
},
"custom_joint_texture_layouts"
:
[],
"custom_joint_texture_layouts"
:
[],
"physics"
:
{
"physics"
:
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment