[Shader/渲染] 升级到URP后原来做粒子效果的Shader不能用了,请高人帮忙修改下...

查看:2587 |回复:6 | 2021-7-29 15:48:22

您需要 登录 才可以下载或查看,没有账号?注册

x
本帖最后由 newmung 于 2021-7-29 15:49 编辑

我试着修改了下
1、把fixed,fixed4改成float,float4,虽然没报错了,但不知道对不对;
2、UnityObjectToWorldNormal,UnityObjectToClipPos找到对应的方式替换了;
3、UNITY_FOG_COORDS,UNITY_APPLY_FOG_COLOR,LIGHTING_COORDS 没找到URP对应的修改,不知道怎么处理。
附上原Shader代码:
  1. Shader "Custom/ParticleShader"
  2. {
  3.         Properties
  4.         {
  5.                 _MainTex("Main Texture", 2D) = "white" {}
  6.                 _Color("Color", Color) = (1,1,1,1)
  7.                 [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlend("SrcBlend", Float) = 5
  8.                 [Enum(UnityEngine.Rendering.BlendMode)] _DstBlend("DstBlend", Float) = 1
  9.                 [Enum(UnityEngine.Rendering.CullMode)] _FaceCull("FaceCull", Float) = 2
  10.                 [Enum(Off, 0, On, 1)] _ZWrite("ZWrite", Float) = 0
  11.                 [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest("ZTest", Float) = 2
  12.                 _OffsetFactor("OffsetFactor", float) = 0
  13.                 _Luminance("Luminance", Range(0.0, 10.0)) = 1
  14.                 _AlphaCullingBias("Alpha Culling Bias", Range(0.0, 1.0)) = 0.0
  15.                 [Toggle(_LIGHTTING_ON)] _LighttingEnable("Enable Lighting", Float) = 0
  16.                 [Toggle(_MASK_TEXTURE_ON)] _MaskTextureEnable("Enable Mask Texture", Float) = 0
  17.                 _MaskTex("Mask Texture", 2D) = "white" {}
  18.                 _MaskTexAnimSpeedU("MaskTex Animation Speed U", Range(-100.0, 100.0)) = 0
  19.                 _MaskTexAnimSpeedV("MaskTex Animation Speed V", Range(-100.0, 100.0)) = 0

  20.                 [Toggle(_FRESNEL_ON)] _FresnelEnable("Enable Fresnel", Float) = 0
  21.                 _FresnelPow("FresnelPow", Range(-10.0, 10.0)) = 1
  22.                 _FresnelIntensity("FresnelIntensity", Range(-10.0, 10.0)) = 1
  23.                 _FresnelColor("FresnelColor", Color) = (1,1,1,0)


  24.                 [Toggle(_PARTICLE_DISSOLUTION_RANGE_ON)] _ParticleDissolutionRangeEnable("Enable Particle Dissolution Range", Float) = 0
  25.                 _DissolutionTex("Dissolution Texture(R,A)", 2D) = "white" {}
  26.                 _DissolutionRange("Dissolution Range", Range(0.0, 1.1)) = 0.5

  27.                 [Toggle(_DISSOLUTION_EDGE_ON)] _DissolutionEdgeEnable("Enable Dissolution Edge", Float) = 0
  28.                 _DissolutionEdgeWidth("Dissolution Edge Width", Range(0.0, 1.0)) = 0.1
  29.                 _DissolutionEdgeColor("Dissolution Edge Color", Color) = (1,1,1,1)
  30.                 _DissolutionEdgeIntensity("Dissolution Edge Intensity", Range(0.0, 10.0)) = 1

  31.                 [Toggle(_INTERFERENCE_ON)] _InterferenceEnable("Enable Interference", Float) = 0
  32.                 _InterferenceTex("Interference Texture(R,G)", 2D) = "gray" {}
  33.                 _InterferenceIntensity("Interference Intensity", Range(0.0, 3.0)) = 1
  34.                 _InterferenceAnimSpeedU("Interference Animation Speed U", Range(-100.0, 100.0)) = 0
  35.                 _InterferenceAnimSpeedV("Interference Animation Speed V", Range(-100.0, 100.0)) = 0
  36.                 _UVAnimSpeedU("UV Animation Speed U", Range(-100.0, 100.0)) = 0
  37.                 _UVAnimSpeedV("UV Animation Speed V", Range(-100.0, 100.0)) = 0

  38.                 [Toggle(_TEXTURE_SHEET_ANIM_ON)] _TextureSheetAnimEnable("Enable Texture Sheet Animation", Float) = 0
  39.                 [Toggle(_TEXTURE_SHEET_ANIM_BLEND_ON)] _TextureSheetAnimBlendEnable("Enable Texture Sheet Animation Blend", Float) = 0
  40.                 _AnimTilingX("Animation Tiling X", float) = 1
  41.                 _AnimTilingY("Animation Tiling Y", float) = 1
  42.                 _AnimFrameCount("Animation Frame Count", float) = 1
  43.                 _AnimStartFrame("Animation Start Frame", float) = 0
  44.                 _AnimFrameTime("Animation Frame Time", float) = 2       
  45.                 [Toggle(_PARTICLE_UV_ANIM_ON)] _ParticleUVAnimEnable("Enable Particle UV Animation(TEXCOORD1.xy)", Float) = 0
  46.                 [Toggle(_PARTICLE_ANIM_RANDOM_ON)] _ParticleAnimRandomEnable("Enable Particle Animation Random(TEXCOORD1.w)", Float) = 0
  47.         }

  48.         Category
  49.         {
  50.                 Tags{ "Queue" = "Transparent" "IgnoreProjector" = "True" "RenderType" = "Transparent" "PreviewType" = "Plane" }
  51.                 Blend[_SrcBlend][_DstBlend]
  52.                 ColorMask RGB
  53.                 Cull [_FaceCull]
  54.                 Lighting Off
  55.                 ZWrite [_ZWrite]
  56.                 ZTest[_ZTest]
  57.                 Offset [_OffsetFactor], 0

  58.                 SubShader
  59.                 {
  60.                         Pass
  61.                         {
  62.                                 CGPROGRAM
  63.                                 #pragma vertex vert
  64.                                 #pragma fragment frag
  65.                                 #pragma multi_compile_fog
  66.                                 #pragma multi_compile_instancing
  67.                                 #pragma shader_feature _LIGHTTING_ON
  68.                                 #pragma shader_feature _MASK_TEXTURE_ON
  69.                                 #pragma shader_feature _FRESNEL_ON
  70.                                 #pragma shader_feature _PARTICLE_DISSOLUTION_RANGE_ON
  71.                                 #pragma shader_feature _DISSOLUTION_EDGE_ON
  72.                                 #pragma shader_feature _INTERFERENCE_ON
  73.                                 #pragma shader_feature _TEXTURE_SHEET_ANIM_ON
  74.                                 #pragma shader_feature _TEXTURE_SHEET_ANIM_BLEND_ON
  75.                                 #pragma shader_feature _PARTICLE_UV_ANIM_ON
  76.                                 #pragma shader_feature _PARTICLE_ANIM_RANDOM_ON
  77.                                 #define _PARTICLE_Clip 0

  78.                                 #include "UnityCG.cginc"
  79.                                 #include "AutoLight.cginc"
  80.                                 #include "UnityStandardParticleInstancing.cginc"

  81.                                 sampler2D _MainTex;
  82.                                 half4 _Color;
  83.                                 sampler2D _MaskTex;
  84.                                 half _MaskTexAnimSpeedU;
  85.                                 half _MaskTexAnimSpeedV;
  86.                                 half _AlphaCullingBias;
  87.                                 fixed _Luminance;
  88.                                 half _EnvirmentLuminance;
  89.                                 half _FresnelPow;
  90.                                 half _FresnelIntensity;
  91.                                 half4 _FresnelColor;
  92.                                 sampler2D _DissolutionTex;
  93.                                 half _DissolutionRange;
  94.                                 half _DissolutionEdgeWidth;
  95.                                 half4 _DissolutionEdgeColor;
  96.                                 half _DissolutionEdgeIntensity;
  97.                                 sampler2D _InterferenceTex;
  98.                                 half _InterferenceIntensity;
  99.                                 half _InterferenceAnimSpeedU;
  100.                                 half _InterferenceAnimSpeedV;
  101.                                 half _UVAnimSpeedU;
  102.                                 half _UVAnimSpeedV;
  103.                                 half _AnimTilingX;
  104.                                 half _AnimTilingY;
  105.                                 half _AnimFrameCount;
  106.                                 half _AnimStartFrame;
  107.                                 half _AnimFrameTime;
  108.                                 fixed _PaticleClip;

  109.                                 struct appdata_t
  110.                                 {
  111.                                         float4 vertex : POSITION;
  112.                                         fixed4 color : COLOR;
  113.                                         float2 texcoord : TEXCOORD0;
  114.                                         #if defined(_PARTICLE_ANIM_RANDOM_ON) || defined(_PARTICLE_UV_ANIM_ON) || defined(_DISSOLUTION_EDGE_ON)
  115.                                                 float4 particleInfo : TEXCOORD1;
  116.                                         #endif
  117.                                                 UNITY_VERTEX_INPUT_INSTANCE_ID
  118.                                         #if defined(_FRESNEL_ON) || defined(_LIGHTTING_ON)
  119.                                                 half3 normal    : NORMAL;
  120.                                         #endif
  121.                                         #ifdef _LIGHTTING_ON
  122.                                                 LIGHTING_COORDS(2,3)
  123.                                         #endif       
  124.                                 };

  125.                                 struct v2f
  126.                                 {
  127.                                         float4 vertex : SV_POSITION;
  128.                                         fixed4 color : COLOR;
  129.                                         float2 texcoord : TEXCOORD0;
  130.                                         #ifdef _INTERFERENCE_ON
  131.                                                 float2 InterferenceTexcoord : TEXCOORD1;
  132.                                         #endif
  133.                                                 UNITY_FOG_COORDS(2)
  134.                                                 UNITY_VERTEX_INPUT_INSTANCE_ID
  135.                                                 UNITY_VERTEX_OUTPUT_STEREO

  136.                                         #if defined(_FRESNEL_ON) || defined(_LIGHTTING_ON)
  137.                                                 half3 normalWorld    : NORMAL;
  138.                                         #endif

  139.                                         #ifdef _FRESNEL_ON
  140.                                                 half3 viewDirWorld    : TEXCOORD3;
  141.                                         #endif

  142.                                         #ifdef _TEXTURE_SHEET_ANIM_ON
  143.                                                 half4 tiledAnimCoord : TEXCOORD4;
  144.                                         #endif

  145.                                         #ifdef _MASK_TEXTURE_ON
  146.                                                 half2 maskTexcoord : TEXCOORD5;
  147.                                         #endif

  148.                                         #ifdef _DISSOLUTION_EDGE_ON
  149.                                                 half3 dissolutionTexcoord : TEXCOORD6;
  150.                                         #endif
  151.                                                 float4 worldPosition : TEXCOORD7;
  152.                                 };

  153.                                 float4 _MainTex_ST;
  154.                                 float4 _InterferenceTex_ST;
  155.                                 float4 _MaskTex_ST;
  156.                                 float4 _DissolutionTex_ST;
  157.                                 float4 _ClipRect;
  158.                                 #ifdef _LIGHTTING_ON
  159.                                 uniform float4 _LightColor0;
  160.                                 #endif

  161.                                 inline float SoftUnityGet2DClipping (in float2 position, in float4 clipRect)
  162.                                 {
  163.                                         float _ClipSoftX = 0.001;
  164.                                         float _ClipSoftY = 0.001;
  165.                                         float2 xy = (position.xy-clipRect.xy)/float2(_ClipSoftX,_ClipSoftY)*step(clipRect.xy, position.xy);
  166.                                         float2 zw = (clipRect.zw-position.xy)/float2(_ClipSoftX,_ClipSoftY)*step(position.xy,clipRect.zw);
  167.                                         float2 factor = clamp(0, zw, xy);
  168.                                         return saturate(min(factor.x,factor.y));
  169.                                 }

  170.                                 v2f vert(appdata_t v)
  171.                                 {
  172.                                         v2f o;
  173.                                         UNITY_SETUP_INSTANCE_ID(v);
  174.                                         UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
  175.                                         o.vertex = UnityObjectToClipPos(v.vertex);
  176.                                         o.worldPosition = 0;
  177.                                         if(_PaticleClip > _PARTICLE_Clip)
  178.                                         {
  179.                                                 o.worldPosition = mul(unity_ObjectToWorld,v.vertex);
  180.                                         }
  181.                                         o.color = v.color * _Color;                                       
  182.                                         o.texcoord = TRANSFORM_TEX(v.texcoord,_MainTex);

  183.                                         #ifdef _DISSOLUTION_EDGE_ON
  184.                                                 o.dissolutionTexcoord = float3(TRANSFORM_TEX(v.texcoord, _DissolutionTex), v.particleInfo.z);
  185.                                         #endif
  186.                                         #ifdef _MASK_TEXTURE_ON
  187.                                                 o.maskTexcoord = TRANSFORM_TEX(v.texcoord, _MaskTex);
  188.                                         #endif
  189.                                         #ifdef _INTERFERENCE_ON
  190.                                                 o.InterferenceTexcoord = TRANSFORM_TEX(v.texcoord, _InterferenceTex);
  191.                                         #endif
  192.                                         #ifdef _TEXTURE_SHEET_ANIM_ON
  193.                                                 half tileCount = _AnimTilingX * _AnimTilingY;
  194.                                                 half startFrame = _AnimStartFrame;
  195.                                                 #ifdef _PARTICLE_ANIM_RANDOM_ON
  196.                                                         startFrame += floor(v.particleInfo.w * _AnimFrameCount);
  197.                                                 #endif
  198.                                                 half texIndex = fmod(floor(_Time.y / _AnimFrameTime + startFrame), _AnimFrameCount);

  199.                                                 o.tiledAnimCoord.x = (o.texcoord.x + fmod(texIndex, _AnimTilingX)) / _AnimTilingX;
  200.                                                 o.tiledAnimCoord.y = (o.texcoord.y + floor(_AnimTilingY - (texIndex + 0.01) / _AnimTilingX)) / _AnimTilingY;
  201.                                                 #ifdef _TEXTURE_SHEET_ANIM_BLEND_ON
  202.                                                         half texIndexBlend = fmod(texIndex + 1.0, _AnimFrameCount);
  203.                                                         half2 texUVBlend;
  204.                                                         o.tiledAnimCoord.z = (o.texcoord.x + fmod(texIndexBlend, _AnimTilingX)) / _AnimTilingX;
  205.                                                         o.tiledAnimCoord.w = (o.texcoord.y + floor(_AnimTilingY - (texIndexBlend + 0.01) / _AnimTilingX)) / _AnimTilingY;
  206.                                                 #endif
  207.                                         #endif

  208.                                         #ifdef _PARTICLE_UV_ANIM_ON
  209.                                                         half2 particleUVAnimOffset = half2(v.particleInfo.xy);
  210.                                                 #ifdef _TEXTURE_SHEET_ANIM_ON
  211.                                                         o.tiledAnimCoord.xy -= particleUVAnimOffset;
  212.                                                         #ifdef _TEXTURE_SHEET_ANIM_ON
  213.                                                                 #ifdef _TEXTURE_SHEET_ANIM_BLEND_ON
  214.                                                                         o.tiledAnimCoord.zw -= particleUVAnimOffset;
  215.                                                                 #endif
  216.                                                         #endif
  217.                                                 #else
  218.                                                                 o.texcoord.xy -= particleUVAnimOffset;
  219.                                                 #endif
  220.                                         #endif
  221.                                
  222.                                         if(_UVAnimSpeedU != 0 || _UVAnimSpeedV != 0)
  223.                                         {
  224.                                                 half2 uvAnimOffset = half2(_UVAnimSpeedU, _UVAnimSpeedV) * _Time.x;
  225.                                                 #ifdef _TEXTURE_SHEET_ANIM_ON
  226.                                                         o.tiledAnimCoord.xy -= uvAnimOffset;
  227.                                                         #ifdef _TEXTURE_SHEET_ANIM_ON
  228.                                                                 #ifdef _TEXTURE_SHEET_ANIM_BLEND_ON
  229.                                                                         o.tiledAnimCoord.zw -= uvAnimOffset;
  230.                                                                 #endif
  231.                                                         #endif
  232.                                                 #else
  233.                                                         o.texcoord.xy -= uvAnimOffset;
  234.                                                 #endif
  235.                                         }

  236.                                         UNITY_TRANSFER_FOG(o,o.vertex);
  237.                                         #if defined(_FRESNEL_ON) || defined(_LIGHTTING_ON)
  238.                                                 o.normalWorld = UnityObjectToWorldNormal(v.normal);
  239.                                         #endif

  240.                                         #ifdef _FRESNEL_ON
  241.                                                 float4 posWorld = mul(unity_ObjectToWorld, v.vertex);
  242.                                                 o.viewDirWorld = normalize(posWorld.xyz - _WorldSpaceCameraPos);
  243.                                         #endif
  244.                                         return o;
  245.                                 }

  246.                                 fixed4 frag(v2f i) : SV_Target
  247.                                 {
  248.                                         UNITY_SETUP_INSTANCE_ID(i);
  249.                                         #ifdef _DISSOLUTION_EDGE_ON
  250.                                                 half2 dissolutionTex = tex2D(_DissolutionTex, i.dissolutionTexcoord.xy).ra;
  251.                                                 half dissolution = dissolutionTex.x * dissolutionTex.y;// *i.dissolutionTexcoord.z;
  252.                                                 #ifdef _PARTICLE_DISSOLUTION_RANGE_ON
  253.                                                         half dissolutionRange = i.dissolutionTexcoord.z;
  254.                                                 #else
  255.                                                         half dissolutionRange = _DissolutionRange;
  256.                                                 #endif
  257.                                                 if (dissolution < dissolutionRange)
  258.                                                 {
  259.                                                         discard;
  260.                                                 }
  261.                                         #endif

  262.                                         #ifdef _TEXTURE_SHEET_ANIM_ON
  263.                                                 half2 texUV = i.tiledAnimCoord.xy;
  264.                                                 #ifdef _TEXTURE_SHEET_ANIM_BLEND_ON
  265.                                                         half2 texUVBlend = i.tiledAnimCoord.zw;
  266.                                                 #endif
  267.                                         #else
  268.                                                 half2 texUV = i.texcoord;
  269.                                         #endif

  270.                                         #ifdef _INTERFERENCE_ON
  271.                                                 half2 interferenceUV = i.InterferenceTexcoord;
  272.                                                 if(_InterferenceAnimSpeedU != 0 || _InterferenceAnimSpeedV != 0)
  273.                                                 {
  274.                                                         interferenceUV -= half2(_InterferenceAnimSpeedU, _InterferenceAnimSpeedV) * _Time.x;
  275.                                                 }
  276.                                                 half2 interference = (tex2D(_InterferenceTex, interferenceUV).rg - 0.5) * 2 * _InterferenceIntensity;
  277.                                                 texUV += interference;
  278.                                                 #ifdef _TEXTURE_SHEET_ANIM_ON
  279.                                                         #ifdef _TEXTURE_SHEET_ANIM_BLEND_ON
  280.                                                                 texUVBlend += interference;
  281.                                                         #endif
  282.                                                 #endif
  283.                                         #endif

  284.                                         fixed4 col = tex2D(_MainTex, texUV);
  285.                                         #ifdef _TEXTURE_SHEET_ANIM_ON
  286.                                                 #ifdef _TEXTURE_SHEET_ANIM_BLEND_ON
  287.                                                         fixed4 colBlend = tex2D(_MainTex, texUVBlend);
  288.                                                         half blendFactor = fmod(_Time.y, _AnimFrameTime) / _AnimFrameTime;
  289.                                                         //return blendFactor;
  290.                                                         col = col * (1.0 - blendFactor) + colBlend * blendFactor;
  291.                                                         //return col;
  292.                                                 #endif
  293.                                         #endif

  294.                                         col *=  i.color;
  295.                                         col.rgb *= _Luminance;

  296.                                         #ifdef _LIGHTTING_ON
  297.                                                 float3 normalDirection = normalize(i.normalWorld);
  298.                                                 float3 lightDirection = normalize(_WorldSpaceLightPos0.xyz);
  299.                                                 float3 lightColor = _LightColor0.rgb;
  300.                                                 float attenuation = LIGHT_ATTENUATION(i);
  301.                                                 float3 attenColor = attenuation * _LightColor0.xyz;
  302.                                                 float NdotL = max(0.0,dot( normalDirection, lightDirection ));
  303.                                                 float3 directDiffuse = max( 0.0, NdotL) * attenColor;
  304.                                                 float3 diffuseColor = col.rgb;
  305.                                                 diffuseColor *= directDiffuse + UNITY_LIGHTMODEL_AMBIENT.rgb;
  306.                                                 col.rgb = diffuseColor;
  307.                                         #else
  308.                                                 col.rgb *= _EnvirmentLuminance;       
  309.                                         #endif

  310.                                         #ifdef _MASK_TEXTURE_ON
  311.                                                 half2 maskUv = i.maskTexcoord;
  312.                                                 if(_MaskTexAnimSpeedU != 0 || _MaskTexAnimSpeedV != 0)
  313.                                                 {
  314.                                                         maskUv -= half2(_MaskTexAnimSpeedU, _MaskTexAnimSpeedV) * _Time.x;
  315.                                                 }
  316.                                                 col *= tex2D(_MaskTex, maskUv);
  317.                                         #endif

  318.                                         if(_AlphaCullingBias > 0)
  319.                                         {
  320.                                                 if (col.a < _AlphaCullingBias)
  321.                                                 {
  322.                                                         discard;
  323.                                                 }
  324.                                         }
  325.                                         #ifdef _FRESNEL_ON
  326.                                                 float fresnel = 1 - abs(dot(normalize(i.viewDirWorld), normalize(i.normalWorld)));
  327.                                                 fresnel = pow(fresnel, _FresnelPow) * _FresnelIntensity;

  328.                                                 col.rgb += fresnel * _FresnelColor.rgb;
  329.                                                 col.a = col.a * (1 - _FresnelColor.a) + col.a * fresnel * _FresnelColor.a;
  330.                                         #endif


  331.                                         #ifdef _DISSOLUTION_EDGE_ON
  332.                                                 half s1 = step(dissolution, dissolutionRange);
  333.                                                 half s2 = step(dissolution, dissolutionRange + _DissolutionEdgeWidth);
  334.                                                 half3 dissolutionEdge = (s2 - s1) * _DissolutionEdgeColor * _DissolutionEdgeIntensity;
  335.                                                 col.rgb = col.rgb * (0.5 + dissolutionEdge) + dissolutionEdge * 0.5;
  336.                                         #endif
  337.                                                
  338.                                         if(_PaticleClip > _PARTICLE_Clip)
  339.                                         {
  340.                                                 col.a*=  SoftUnityGet2DClipping(i.worldPosition.xy, _ClipRect);
  341.                                         }
  342.                                         UNITY_APPLY_FOG_COLOR(i.fogCoord, col, fixed4(0, 0, 0, 0)); // fog towards black due to our blend mode
  343.        
  344.                                         return col;
  345.                                 }
  346.                                 ENDCG
  347.                         }
  348.                 }
  349.         }
  350. }
点击此处复制文本


2021-7-29 15:48:22  
 赞 赞 0

使用道具 登录

6个回答,把该问题分享到群,邀请大神一起回答。
2#
是我看不懂的代码了
回复 收起回复
2021-7-29 17:26:41   回复
 赞 赞 0

使用道具 登录

3#
可以去找国内UPR官方群,好像要花钱他们还可以帮你优化
回复 收起回复
newmung : URP官方群能给我个群号么,我找到一个URP 学习交流群,感觉没人回答问题
2021-7-30 15:40 回复
Chn_泡面 : https://developer.unity.cn/ask 提问网址
2021-7-30 15:49 回复
2021-7-29 19:25:20   回复
 赞 赞 0

使用道具 登录

4#
改了一天多,差不多了,基本上都能在网上找到
1、fixed 对应 real
2、雾,光照的那几个宏参考下面连接都能解决https://91maketop.github.io/ta/#/ShaderLab%E7%AE%80%E6%98%8E ... %86%85%E7%BD%AE%E5%8D%87%E7%BA%A7URP
3、网上说的Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderVariablesFunctions.hlsl 这个要改成Packages/com.unity.shadergraph/ShaderGraphLibrary/ShaderVariablesFunctions.hlsl
回复 收起回复
2021-7-30 15:50:55   回复
 赞 赞 0

使用道具 登录

5#
谢谢大佬分享,真心学到了
回复 收起回复
2021-8-13 13:13:35   回复
 赞 赞 1

使用道具 登录

6#
开关多 变种多  反而编译生成N个shader   shader 的 接口 就是应该简洁容易调整  而不是什么都囊括进来  大而全的 shader 性能效率不高  还容易头晕  让使用者头疼不已.
回复 收起回复
2021-9-2 21:26:40   回复
 赞 赞 0

使用道具 登录

7#
元素是个好家园,加油啊
回复 收起回复
2022-11-3 17:45:40   回复
 赞 赞 1

使用道具 登录

CG 游戏行业专业问题

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表