1 2 3 4 5 6 7 8 9 10 11 | Shader "Custom/Textured With Detail" { Properties { _Tint ("Tint", Color) = (1, 1, 1, 1) _MainTex ("Texture", 2D) = "white" {} } SubShader { … } } |
1 2 3 4 | float4 MyFragmentProgram (Interpolators i) : SV_TARGET { float4 color = tex2D(_MainTex, i.uv) * _Tint; return 关于友谊的诗color; } | 兰溪地下长河
于的用法 |
1 2 孟格布禄3 | float4 color = tex2D(_MainTex, i.uv) * _Tint; color = tex2D(_MainTex, i.uv * 10); return color; |
1 2 3 4 5 6 7 8 9 10 | uniform sampler2D _MainTex; in vec2 vs_TEXCOORD0; layout(location = 0) out vec4 SV_TARGET0; vec2 t0; void main() { t0.xy = * vec2(10.0, 10.0); SV_TARGET0 = texture(_MainTex, t0.xy); return; } |
1 2 3 4 5 6 7 8 9 10 | SetTexture 0 [_MainTex] 2D 0 ps_4_0 dcl_sampler s0, mode_default dcl_resource_texture2d (float,float,float,float) t0 dcl_input_ps dcl_w dcl_temps 1 0: , v0.xyxx, l(10.000000, 10.000000, 0.000000, 0.000000) 1: w, r0.xyxx, t0.xyzw, s0 2: ret |
1 2 3 | float4 color = tex2D(_MainTex, i.uv) * _Tint; color *= tex2D(_MainTex, i.uv); return color; |
1 2 3 4客服职责 5 6 7 8 9 10 11 12 | uniform sampler2D _MainTex; in vec2 vs_TEXCOORD0; layout(location = 0) out vec4 SV_TARGET0; mediump vec4 t16_0; lowp vec4 t10_0; void main() { t10_0 = texture(_MainTex, ); t16_0 = t10_0 * t10_0; SV_TARGET0 = t16_0 * _Tint; return; } |
1 2 3 4 5 我的人生故事6 7 8 9 10 11 12 13 14 15 | SetTexture 0 [_MainTex] 2D 0 ConstBuffer "$Globals" 144 Vector 96 [_Tint] BindCB "$Globals" 0 ps_4_0 dcl_constantbuffer cb0[7], immediateIndexed dcl_sampler s0, mode_default 君子之约dcl_resource_texture2d (float,float,float,float) t0 dcl_input_ps dcl_w dcl_temps 1 0: w, v0.xyxx, t0.xyzw, s0 1: w, r0.xyzw, r0.xyzw 2: w, r0.xyzw, cb0[6].xyzw 3: ret |
1 | color *= tex2D(_MainTex, i.uv * 10); |
本文发布于:2023-06-12 01:21:47,感谢您对本站的认可!
本文链接:https://www.wtabcd.cn/fanwen/fan/89/1034498.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
留言与评论(共有 0 条评论) |