#Updating old project from 2020 -> 6000: Broken Shaders

1 messages · Page 1 of 1 (latest)

faint iris
#

So because of the security issue im updating an old project to current version. but the issue is that some shaders broke. the only unity specific unity macros i can see are these:
Did anything of this change name or use the past few years?

UNITY_VERTEX_INPUT_INSTANCE_ID    
UNITY_VERTEX_OUTPUT_STEREO

UNITY_SETUP_INSTANCE_ID(v);
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
UNITY_TRANSFER_INSTANCE_ID(v, o);

UNITY_SETUP_INSTANCE_ID(i);
UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i);

UnityObjectToClipPos()

CBUFFER_START(UnityPerMaterial)
CBUFFER_END

then the pragmas used are these:

#pragma vertex baseVertex
#pragma fragment baseFragment
#pragma multi_compile_fwdbase nolightmap nodirlightmap nodynlightmap novertexlight

#pragma prefer_hlslcc gles
#pragma exclude_renderers d3d11_9x
#pragma target 2.0
#pragma vertex outlineVertex
#pragma fragment outlineFragment
#pragma multi_compile_local __ CONFIDENCE

#pragma prefer_hlslcc gles
#pragma exclude_renderers d3d11_9x
#pragma target 2.0
#

actually im seeing now these requirements:

PackageRequirements { "com.unity.render-pipelines.universal": "[10.8.1,10.10.0]" }
PackageRequirements { "com.unity.render-pipelines.universal": "12.1.7" }

which are listed as URP 2020 and URP 2021+, but idk if the 2021+ actually was future proof lol

#

so maybe the different pass that its probably using now might be not set up correctly with current unity?

Pass
{
    PackageRequirements { "com.unity.render-pipelines.universal": "12.1.7" }
            
    Name "Outline-URP-2021+"
    Tags { "LightMode" = "UniversalForwardOnly" "RenderType" = "Transparent" "Queue" = "Transparent" "IgnoreProjector" = "True" "RenderPipeline" = "UniversalPipeline" }
            
    Cull Front
    Blend SrcAlpha OneMinusSrcAlpha

    CGPROGRAM
    #include "OculusHandOutlineCG.cginc"            
    ENDCG
}
            
Pass
{
    Name "Outline-DRP"
    Tags { "RenderType" = "Transparent" "Queue" = "Transparent" "IgnoreProjector" = "True" }
            
    Cull Front
    Blend SrcAlpha OneMinusSrcAlpha

    CGPROGRAM
    #include "OculusHandOutlineCG.cginc"            
    ENDCG
}
carmine sierra
#

Might help if you share an actual error. 😅

faint iris
#

there is no obvious error, it just renders as magenta

#

unless you have some way to statically analyze hlsl code then i dont know of any other way to get errors in shaders

fallow osprey
#

If you only care about the security issue why not update to 2020.3.49f1

carmine sierra
faint iris
#

there are some other features that would be nice to have if we can get it to work. but if not then i suppose we could. tho this is a fairly small concept project for a client that we have been handed

#

nothing here

#

this was the settings it had before while it didd work but let me just check its not dividing by zero real quick

carmine sierra
#

That's a material. Not a shader

faint iris
#

ah my bad, here
and yeah it seems like it is the versioned passes probably that is fallbacking to a pass that isnt working

#

actually when i think about it, im pretty sure this is an ocolus package shader, so maybe they have an updated package with updated shaders

faint iris