drawRainBow:整理代码,移除冗余变量

This commit is contained in:
chengen
2025-06-06 13:37:01 +08:00
parent a7a133e452
commit 530968e47c
3 changed files with 4 additions and 16 deletions

View File

@@ -1,7 +1,7 @@
[
{
"__type__": "cc.SceneAsset",
"_name": "rainbow",
"_name": "main",
"_objFlags": 0,
"__editorExtras__": {},
"_native": "",
@@ -11,7 +11,7 @@
},
{
"__type__": "cc.Scene",
"_name": "rainbow",
"_name": "main",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": null,
@@ -175,7 +175,7 @@
"_priority": 1073741824,
"_fov": 45,
"_fovAxis": 0,
"_orthoHeight": 320,
"_orthoHeight": 414.62365591397844,
"_near": 1,
"_far": 2000,
"_color": {

View File

@@ -32,10 +32,6 @@ CCProgram sprite-vs %{
out vec4 v_color;
out vec2 v_uv0;
#if USE_TEXTURE
in vec2 a_uv0;
#endif
vec4 vert () {
vec4 pos = vec4(a_position, 1);
@@ -51,10 +47,6 @@ CCProgram sprite-vs %{
pos = cc_matViewProj * pos;
#endif
#if USE_TEXTURE
v_uv0 = a_uv0;
#endif
v_color = a_color;
v_uv0 = a_texCoord;
@@ -91,7 +83,6 @@ CCProgram sprite-fs %{
vec4 frag() {
vec3 color = vec3(1,1,1);
// vec2 point = vec2(.5,1.);
vec2 point = vec2(.5,.5);
float circleline_red = drawHalfCircleLine(point, v_uv0, .4, .05);
@@ -121,10 +112,7 @@ CCProgram sprite-fs %{
// vec3 c = vec3(0.);
// float x = v_uv0.x;
// float y = v_uv0.y;
// c = vec3(sin(4.*x+0.85)*2.-0.5,
// sin(5.*x-1.),
// sin(3.*x-1.5) *1.5
// );
// c = vec3(sin(4.*x+0.85)*2.-0.5, sin(5.*x-1.),sin(3.*x-1.5) *1.5);
// o = vec4(c, 1);
return o;