为您找到相关结果86,065个
three.js着色器材质的内置变量示例详解_javascript技巧_脚本之家
vertexShader: ` uniform float time; void main() { float y = sin(position.x / 50.0 + time) * 10.0 + sin(position.y / 50.0 + time) * 10.0; vec3 newPosition = vec3(position.x, position.y, y * 2.0 ); gl_PointSize = (y + 20.0) / 4.0; gl_Position = projectionMatrix * model...
www.jb51.net/article/1933...htm 2025-6-12
Android中的OpenGL使用配置详解_Android_脚本之家
GLES20.glDisableVertexAttribArray(positionHandle) } } 渲染器实现如下: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 // 渲染器实现 class MRenderer(private var context: Context) : GLSurfaceView.Renderer { private val tag = MRenderer::class.java.simpleName private ...
www.jb51.net/article/2766...htm 2025-5-30
unity置灰处理的实现_C#教程_脚本之家
#pragma vertex vert #pragma fragment frag #include "UnityCG.cginc" struct appdata { float4 vertex : POSITION; float2 uv : TEXCOORD0; }; struct v2f { float2 uv : TEXCOORD0; float4 vertex : SV_POSITION; }; v2f vert (appdata v) { v2f o; o.vertex = UnityObjectToClipPos(v.vertex...
www.jb51.net/article/2177...htm 2025-6-4
Unity Shader实现黑幕过场效果_C#教程_脚本之家
#pragma vertex vert_img #pragma fragment frag #include "UnityCG.cginc" fixed4 _Color; sampler2D _MainTex; float _Radius; float _Center_X; float _Center_Y; float _Sharp; float _tanh(float x) { return 2.0f / (1.0f + exp(-2.0f * x)) - 1.0f; } float4 frag(v2f_img i) ...
www.jb51.net/article/2182...htm 2025-6-21