From f74b578cdb52c4ca6a0567440bc3e661ba4a7442 Mon Sep 17 00:00:00 2001 From: H3idi-X Date: Tue, 11 Apr 2023 08:42:31 +0900 Subject: [PATCH] deleted obsolete shader .hlsl files. (#300) --- .../HDRP/Shaders/DebugDisplayHDRP7.hlsl | 272 ------------------ .../HDRP/Shaders/DebugDisplayHDRP7.hlsl.meta | 9 - .../HDRP/Shaders/ShaderPassForwardHDRP7.hlsl | 237 --------------- .../Shaders/ShaderPassForwardHDRP7.hlsl.meta | 9 - 4 files changed, 527 deletions(-) delete mode 100644 com.unity.toonshader/Runtime/HDRP/Shaders/DebugDisplayHDRP7.hlsl delete mode 100644 com.unity.toonshader/Runtime/HDRP/Shaders/DebugDisplayHDRP7.hlsl.meta delete mode 100644 com.unity.toonshader/Runtime/HDRP/Shaders/ShaderPassForwardHDRP7.hlsl delete mode 100644 com.unity.toonshader/Runtime/HDRP/Shaders/ShaderPassForwardHDRP7.hlsl.meta diff --git a/com.unity.toonshader/Runtime/HDRP/Shaders/DebugDisplayHDRP7.hlsl b/com.unity.toonshader/Runtime/HDRP/Shaders/DebugDisplayHDRP7.hlsl deleted file mode 100644 index 5228a540a..000000000 --- a/com.unity.toonshader/Runtime/HDRP/Shaders/DebugDisplayHDRP7.hlsl +++ /dev/null @@ -1,272 +0,0 @@ -#ifndef UNITY_DEBUG_DISPLAY_INCLUDED -#define UNITY_DEBUG_DISPLAY_INCLUDED - -#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Debug.hlsl" -#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl" -#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugDisplay.cs.hlsl" -#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Debug/MaterialDebug.cs.hlsl" -#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Debug/LightingDebug.cs.hlsl" -#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Debug/MipMapDebug.cs.hlsl" -#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Debug/ColorPickerDebug.cs.hlsl" - -CBUFFER_START(UnityDebugDisplay) -// Set of parameters available when switching to debug shader mode -int _DebugLightingMode; // Match enum DebugLightingMode -int _DebugShadowMapMode; -float _DebugViewMaterialArray[11]; // Contain the id (define in various materialXXX.cs.hlsl) of the property to display -int _DebugMipMapMode; // Match enum DebugMipMapMode -int _DebugMipMapModeTerrainTexture; // Match enum DebugMipMapModeTerrainTexture -int _ColorPickerMode; // Match enum ColorPickerDebugMode -int _DebugStep; -int _DebugDepthPyramidMip; -int _DebugFullScreenMode; -float _DebugTransparencyOverdrawWeight; -float4 _DebugLightingAlbedo; // x == bool override, yzw = albedo for diffuse -float4 _DebugLightingSmoothness; // x == bool override, y == override value -float4 _DebugLightingNormal; // x == bool override -float4 _DebugLightingAmbientOcclusion; // x == bool override, y == override value -float4 _DebugLightingSpecularColor; // x == bool override, yzw = specular color -float4 _DebugLightingEmissiveColor; // x == bool override, yzw = emissive color -float4 _DebugLightingMaterialValidateHighColor; // user can specific the colors for the validator error conditions -float4 _DebugLightingMaterialValidateLowColor; -float4 _DebugLightingMaterialValidatePureMetalColor; -float4 _MousePixelCoord; // xy unorm, zw norm -float4 _MouseClickPixelCoord; // xy unorm, zw norm -int _MatcapMixAlbedo; -int _MatcapViewScale; -uint _DebugContactShadowLightIndex; -CBUFFER_END - -// Local shader variables -static DirectionalShadowType g_DebugShadowAttenuation = 0; - -StructuredBuffer _DebugDepthPyramidOffsets; - -#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Debug/PBRValidator.hlsl" - -// When displaying lux meter we compress the light in order to be able to display value higher than 65504 -// The sun is between 100 000 and 150 000, so we use 4 to be able to cover such a range (4 * 65504) -#define LUXMETER_COMPRESSION_RATIO 4 - -TEXTURE2D(_DebugFont); // Debug font to write string in shader -TEXTURE2D(_DebugMatCapTexture); - -void GetPropertiesDataDebug(uint paramId, inout float3 result, inout bool needLinearToSRGB) -{ - switch (paramId) - { - case DEBUGVIEWPROPERTIES_TESSELLATION: -#ifdef TESSELLATION_ON - result = float3(1.0, 0.0, 0.0); -#else - result = float3(0.0, 0.0, 0.0); -#endif - break; - - case DEBUGVIEWPROPERTIES_PIXEL_DISPLACEMENT: -#ifdef _PIXEL_DISPLACEMENT // Caution: This define is related to a shader features (But it may become a standard features for HD) - result = float3(1.0, 0.0, 0.0); -#else - result = float3(0.0, 0.0, 0.0); -#endif - break; - - case DEBUGVIEWPROPERTIES_VERTEX_DISPLACEMENT: -#ifdef _VERTEX_DISPLACEMENT // Caution: This define is related to a shader features (But it may become a standard features for HD) - result = float3(1.0, 0.0, 0.0); -#else - result = float3(0.0, 0.0, 0.0); -#endif - break; - - case DEBUGVIEWPROPERTIES_TESSELLATION_DISPLACEMENT: -#ifdef _TESSELLATION_DISPLACEMENT // Caution: This define is related to a shader features (But it may become a standard features for HD) - result = float3(1.0, 0.0, 0.0); -#else - result = float3(0.0, 0.0, 0.0); -#endif - break; - - case DEBUGVIEWPROPERTIES_DEPTH_OFFSET: -#ifdef _DEPTHOFFSET_ON // Caution: This define is related to a shader features (But it may become a standard features for HD) - result = float3(1.0, 0.0, 0.0); -#else - result = float3(0.0, 0.0, 0.0); -#endif - break; - - case DEBUGVIEWPROPERTIES_LIGHTMAP: -#if defined(LIGHTMAP_ON) || defined (DIRLIGHTMAP_COMBINED) || defined(DYNAMICLIGHTMAP_ON) - result = float3(1.0, 0.0, 0.0); -#else - result = float3(0.0, 0.0, 0.0); -#endif - break; - - case DEBUGVIEWPROPERTIES_INSTANCING: -#if defined(UNITY_INSTANCING_ENABLED) - result = float3(1.0, 0.0, 0.0); -#else - result = float3(0.0, 0.0, 0.0); -#endif - break; - } -} - -float3 GetTextureDataDebug(uint paramId, float2 uv, Texture2D tex, float4 texelSize, float4 mipInfo, float3 originalColor) -{ - float3 outColor = originalColor; - - switch (paramId) - { - case DEBUGMIPMAPMODE_MIP_RATIO: - outColor = GetDebugMipColorIncludingMipReduction(originalColor, tex, texelSize, uv, mipInfo); - break; - case DEBUGMIPMAPMODE_MIP_COUNT: - outColor = GetDebugMipCountColor(originalColor, tex); - break; - case DEBUGMIPMAPMODE_MIP_COUNT_REDUCTION: - outColor = GetDebugMipReductionColor(tex, mipInfo); - break; - case DEBUGMIPMAPMODE_STREAMING_MIP_BUDGET: - outColor = GetDebugStreamingMipColor(tex, mipInfo); - break; - case DEBUGMIPMAPMODE_STREAMING_MIP: - outColor = GetDebugStreamingMipColorBlended(originalColor, tex, mipInfo); - break; - } - - return outColor; -} - -// DebugFont code assume black and white font with texture size 256x128 with bloc of 16x16 -#define DEBUG_FONT_TEXT_WIDTH 16 -#define DEBUG_FONT_TEXT_HEIGHT 16 -#define DEBUG_FONT_TEXT_COUNT_X 16 -#define DEBUG_FONT_TEXT_COUNT_Y 8 -#define DEBUG_FONT_TEXT_ASCII_START 32 - -#define DEBUG_FONT_TEXT_SCALE_WIDTH 10 // This control the spacing between characters (if a character fill the text block it will overlap). - -// Only support ASCII symbol from DEBUG_FONT_TEXT_ASCII_START to 126 -// return black or white depends if we hit font character or not -// currentUnormCoord is current unormalized screen position -// fixedUnormCoord is the position where we want to draw something, this will be incremented by block font size in provided direction -// color is current screen color -// color of the font to use -// direction is 1 or -1 and indicate fixedUnormCoord block shift -void DrawCharacter(uint asciiValue, float3 fontColor, uint2 currentUnormCoord, inout uint2 fixedUnormCoord, inout float3 color, int direction) -{ - // Are we inside a font display block on the screen ? - uint2 localCharCoord = currentUnormCoord - fixedUnormCoord; - if (localCharCoord.x >= 0 && localCharCoord.x < DEBUG_FONT_TEXT_WIDTH && localCharCoord.y >= 0 && localCharCoord.y < DEBUG_FONT_TEXT_HEIGHT) - { - localCharCoord.y = DEBUG_FONT_TEXT_HEIGHT - localCharCoord.y; - - asciiValue -= DEBUG_FONT_TEXT_ASCII_START; // Our font start at ASCII table 32; - uint2 asciiCoord = uint2(asciiValue % DEBUG_FONT_TEXT_COUNT_X, asciiValue / DEBUG_FONT_TEXT_COUNT_X); - // Unorm coordinate inside the font texture - uint2 unormTexCoord = asciiCoord * uint2(DEBUG_FONT_TEXT_WIDTH, DEBUG_FONT_TEXT_HEIGHT) + localCharCoord; - // normalized coordinate - float2 normTexCoord = float2(unormTexCoord) / float2(DEBUG_FONT_TEXT_WIDTH * DEBUG_FONT_TEXT_COUNT_X, DEBUG_FONT_TEXT_HEIGHT * DEBUG_FONT_TEXT_COUNT_Y); - - #if UNITY_UV_STARTS_AT_TOP - normTexCoord.y = 1.0 - normTexCoord.y; - #endif - - float charColor = SAMPLE_TEXTURE2D_LOD(_DebugFont, s_point_clamp_sampler, normTexCoord, 0).r; - color = color * (1.0 - charColor) + charColor * fontColor; - } - - fixedUnormCoord.x += DEBUG_FONT_TEXT_SCALE_WIDTH * direction; -} - -// Shortcut to not have to file direction -void DrawCharacter(uint asciiValue, float3 fontColor, uint2 currentUnormCoord, inout uint2 fixedUnormCoord, inout float3 color) -{ - DrawCharacter(asciiValue, fontColor, currentUnormCoord, fixedUnormCoord, color, 1); -} - -// Draw a signed integer -// Can't display more than 16 digit -// The two following parameter are for float representation -// leading0 is used when drawing frac part of a float to draw the leading 0 (call is in charge of it) -// forceNegativeSign is used to force to display a negative sign as -0 is not recognize -void DrawInteger(int intValue, float3 fontColor, uint2 currentUnormCoord, inout uint2 fixedUnormCoord, inout float3 color, int leading0, bool forceNegativeSign) -{ - const uint maxStringSize = 16; - - uint absIntValue = abs(intValue); - - // 1. Get size of the number of display - int numEntries = min((intValue == 0 ? 0 : log10(absIntValue)) + ((intValue < 0 || forceNegativeSign) ? 1 : 0) + leading0, maxStringSize); - - // 2. Shift curseur to last location as we will go reverse - fixedUnormCoord.x += numEntries * DEBUG_FONT_TEXT_SCALE_WIDTH; - - // 3. Display the number - for (uint j = 0; j < maxStringSize; ++j) - { - // Numeric value incurrent font start on the second row at 0 - DrawCharacter((absIntValue % 10) + '0', fontColor, currentUnormCoord, fixedUnormCoord, color, -1); - if (absIntValue < 10) - break; - absIntValue /= 10; - } - - // 4. Display leading 0 - if (leading0 > 0) - { - for (int i = 0; i < leading0; ++i) - { - DrawCharacter('0', fontColor, currentUnormCoord, fixedUnormCoord, color, -1); - } - } - - // 5. Display sign - if (intValue < 0 || forceNegativeSign) - { - DrawCharacter('-', fontColor, currentUnormCoord, fixedUnormCoord, color, -1); - } - - // 6. Reset cursor at end location - fixedUnormCoord.x += (numEntries + 2) * DEBUG_FONT_TEXT_SCALE_WIDTH; -} - -void DrawInteger(int intValue, float3 fontColor, uint2 currentUnormCoord, inout uint2 fixedUnormCoord, inout float3 color) -{ - DrawInteger(intValue, fontColor, currentUnormCoord, fixedUnormCoord, color, 0, false); -} - -void DrawFloat(float floatValue, float3 fontColor, uint2 currentUnormCoord, inout uint2 fixedUnormCoord, inout float3 color) -{ - if (IsNaN(floatValue)) - { - DrawCharacter('N', fontColor, currentUnormCoord, fixedUnormCoord, color); - DrawCharacter('a', fontColor, currentUnormCoord, fixedUnormCoord, color); - DrawCharacter('N', fontColor, currentUnormCoord, fixedUnormCoord, color); - } - else - { - int intValue = int(floatValue); - bool forceNegativeSign = floatValue >= 0.0f ? false : true; - DrawInteger(intValue, fontColor, currentUnormCoord, fixedUnormCoord, color, 0, forceNegativeSign); - DrawCharacter('.', fontColor, currentUnormCoord, fixedUnormCoord, color); - int fracValue = int(frac(abs(floatValue)) * 1e6); // 6 digit - int leading0 = 6 - (int(log10(fracValue)) + 1); // Counting leading0 to add in front of the float - DrawInteger(fracValue, fontColor, currentUnormCoord, fixedUnormCoord, color, leading0, false); - } -} - -// Debug rendering is performed at the end of the frame (after post-processing). -// Debug textures are never flipped upside-down automatically. Therefore, we must always flip manually. -bool ShouldFlipDebugTexture() -{ - #if UNITY_UV_STARTS_AT_TOP - return (_ProjectionParams.x > 0); - #else - return (_ProjectionParams.x < 0); - #endif -} - -#endif diff --git a/com.unity.toonshader/Runtime/HDRP/Shaders/DebugDisplayHDRP7.hlsl.meta b/com.unity.toonshader/Runtime/HDRP/Shaders/DebugDisplayHDRP7.hlsl.meta deleted file mode 100644 index 6a8885af8..000000000 --- a/com.unity.toonshader/Runtime/HDRP/Shaders/DebugDisplayHDRP7.hlsl.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: ca33d18de8f732043b31a7b3d76017f0 -ShaderImporter: - externalObjects: {} - defaultTextures: [] - nonModifiableTextures: [] - userData: - assetBundleName: - assetBundleVariant: diff --git a/com.unity.toonshader/Runtime/HDRP/Shaders/ShaderPassForwardHDRP7.hlsl b/com.unity.toonshader/Runtime/HDRP/Shaders/ShaderPassForwardHDRP7.hlsl deleted file mode 100644 index 39cfbdf20..000000000 --- a/com.unity.toonshader/Runtime/HDRP/Shaders/ShaderPassForwardHDRP7.hlsl +++ /dev/null @@ -1,237 +0,0 @@ -#if SHADERPASS != SHADERPASS_FORWARD -#error SHADERPASS_is_not_correctly_define -#endif - -#ifdef _WRITE_TRANSPARENT_MOTION_VECTOR -#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/MotionVectorVertexShaderCommon.hlsl" - -PackedVaryingsType Vert(AttributesMesh inputMesh, AttributesPass inputPass) -{ - VaryingsType varyingsType; - varyingsType.vmesh = VertMesh(inputMesh); - return MotionVectorVS(varyingsType, inputMesh, inputPass); -} - -#ifdef TESSELLATION_ON - -PackedVaryingsToPS VertTesselation(VaryingsToDS input) -{ - VaryingsToPS output; - output.vmesh = VertMeshTesselation(input.vmesh); - MotionVectorPositionZBias(output); - - output.vpass.positionCS = input.vpass.positionCS; - output.vpass.previousPositionCS = input.vpass.previousPositionCS; - - return PackVaryingsToPS(output); -} - -#endif // TESSELLATION_ON - -#else // _WRITE_TRANSPARENT_MOTION_VECTOR - -#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/VertMesh.hlsl" - -PackedVaryingsType Vert(AttributesMesh inputMesh) -{ - VaryingsType varyingsType; - varyingsType.vmesh = VertMesh(inputMesh); - - return PackVaryingsType(varyingsType); -} - -#ifdef TESSELLATION_ON - -PackedVaryingsToPS VertTesselation(VaryingsToDS input) -{ - VaryingsToPS output; - output.vmesh = VertMeshTesselation(input.vmesh); - - return PackVaryingsToPS(output); -} - - -#endif // TESSELLATION_ON - -#endif // _WRITE_TRANSPARENT_MOTION_VECTOR - - -#ifdef TESSELLATION_ON -#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/TessellationShare.hlsl" -#endif - -void Frag(PackedVaryingsToPS packedInput, -#ifdef OUTPUT_SPLIT_LIGHTING - out float4 outColor : SV_Target0, // outSpecularLighting - out float4 outDiffuseLighting : SV_Target1, - OUTPUT_SSSBUFFER(outSSSBuffer) -#else - out float4 outColor : SV_Target0 -#ifdef _WRITE_TRANSPARENT_MOTION_VECTOR - , out float4 outMotionVec : SV_Target1 -#endif // _WRITE_TRANSPARENT_MOTION_VECTOR -#endif // OUTPUT_SPLIT_LIGHTING -#ifdef _DEPTHOFFSET_ON - , out float outputDepth : SV_Depth -#endif -) -{ -#ifdef _WRITE_TRANSPARENT_MOTION_VECTOR - // Init outMotionVector here to solve compiler warning (potentially unitialized variable) - // It is init to the value of forceNoMotion (with 2.0) - outMotionVec = float4(2.0, 0.0, 0.0, 0.0); -#endif - - UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(packedInput); - FragInputs input = UnpackVaryingsMeshToFragInputs(packedInput.vmesh); - - // We need to readapt the SS position as our screen space positions are for a low res buffer, but we try to access a full res buffer. - input.positionSS.xy = _OffScreenRendering > 0 ? (input.positionSS.xy * _OffScreenDownsampleFactor) : input.positionSS.xy; - - uint2 tileIndex = uint2(input.positionSS.xy) / GetTileSize(); - - // input.positionSS is SV_Position - PositionInputs posInput = GetPositionInput(input.positionSS.xy, _ScreenSize.zw, input.positionSS.z, input.positionSS.w, input.positionRWS.xyz, tileIndex); - -#ifdef VARYINGS_NEED_POSITION_WS - float3 V = GetWorldSpaceNormalizeViewDir(input.positionRWS); -#else - // Unused - float3 V = float3(1.0, 1.0, 1.0); // Avoid the division by 0 -#endif - - SurfaceData surfaceData; - BuiltinData builtinData; - GetSurfaceAndBuiltinData(input, V, posInput, surfaceData, builtinData); - - BSDFData bsdfData = ConvertSurfaceDataToBSDFData(input.positionSS.xy, surfaceData); - - PreLightData preLightData = GetPreLightData(V, posInput, bsdfData); - - outColor = float4(0.0, 0.0, 0.0, 0.0); - - // We need to skip lighting when doing debug pass because the debug pass is done before lighting so some buffers may not be properly initialized potentially causing crashes on PS4. - -#ifdef DEBUG_DISPLAY - // Init in debug display mode to quiet warning -#ifdef OUTPUT_SPLIT_LIGHTING - outDiffuseLighting = 0; - ENCODE_INTO_SSSBUFFER(surfaceData, posInput.positionSS, outSSSBuffer); -#endif - float4 Set_UV0 = input.texCoord0; - float4 _MainTex_var = SAMPLE_TEXTURE2D(_MainTex, sampler_MainTex, TRANSFORM_TEX(Set_UV0, _MainTex)); - - surfaceData.baseColor = _MainTex_var.xyz; - - - // Same code in ShaderPassForwardUnlit.shader - // Reminder: _DebugViewMaterialArray[i] - // i==0 -> the size used in the buffer - // i>0 -> the index used (0 value means nothing) - // The index stored in this buffer could either be - // - a gBufferIndex (always stored in _DebugViewMaterialArray[1] as only one supported) - // - a property index which is different for each kind of material even if reflecting the same thing (see MaterialSharedProperty) - bool viewMaterial = false; - int bufferSize = int(_DebugViewMaterialArray[0]); - if (bufferSize != 0) - { - bool needLinearToSRGB = false; - float3 result = float3(1.0, 0.0, 1.0); - - // Loop through the whole buffer - // Works because GetSurfaceDataDebug will do nothing if the index is not a known one - for (int index = 1; index <= bufferSize; index++) - { - int indexMaterialProperty = int(_DebugViewMaterialArray[index]); - - // skip if not really in use - if (indexMaterialProperty != 0) - { - viewMaterial = true; - - GetPropertiesDataDebug(indexMaterialProperty, result, needLinearToSRGB); - GetVaryingsDataDebug(indexMaterialProperty, input, result, needLinearToSRGB); - GetBuiltinDataDebug(indexMaterialProperty, builtinData, result, needLinearToSRGB); - GetSurfaceDataDebug(indexMaterialProperty, surfaceData, result, needLinearToSRGB); - GetBSDFDataDebug(indexMaterialProperty, bsdfData, result, needLinearToSRGB); - } - } - - // TEMP! - // For now, the final blit in the backbuffer performs an sRGB write - // So in the meantime we apply the inverse transform to linear data to compensate. - if (!needLinearToSRGB) - result = SRGBToLinear(max(0, result)); - - outColor = float4(result, 1.0); - } - - if (!viewMaterial) - { - if (_DebugFullScreenMode == FULLSCREENDEBUGMODE_VALIDATE_DIFFUSE_COLOR || _DebugFullScreenMode == FULLSCREENDEBUGMODE_VALIDATE_SPECULAR_COLOR) - { - float3 result = float3(0.0, 0.0, 0.0); - - GetPBRValidatorDebug(surfaceData, result); - - outColor = float4(result, 1.0f); - } - else if (_DebugFullScreenMode == FULLSCREENDEBUGMODE_TRANSPARENCY_OVERDRAW) - { - float4 result = _DebugTransparencyOverdrawWeight * float4(TRANSPARENCY_OVERDRAW_COST, TRANSPARENCY_OVERDRAW_COST, TRANSPARENCY_OVERDRAW_COST, TRANSPARENCY_OVERDRAW_A); - outColor = result; - } - else -#endif - { -#ifdef _SURFACE_TYPE_TRANSPARENT - uint featureFlags = LIGHT_FEATURE_MASK_FLAGS_TRANSPARENT; -#else - uint featureFlags = LIGHT_FEATURE_MASK_FLAGS_OPAQUE; -#endif - float3 diffuseLighting; - float3 specularLighting; - - LightLoop(V, posInput, preLightData, bsdfData, builtinData, featureFlags, diffuseLighting, specularLighting); - - diffuseLighting *= GetCurrentExposureMultiplier(); - specularLighting *= GetCurrentExposureMultiplier(); - -#ifdef OUTPUT_SPLIT_LIGHTING - if (_EnableSubsurfaceScattering != 0 && ShouldOutputSplitLighting(bsdfData)) - { - outColor = float4(specularLighting, 1.0); - outDiffuseLighting = float4(TagLightingForSSS(diffuseLighting), 1.0); - } - else - { - outColor = float4(diffuseLighting + specularLighting, 1.0); - outDiffuseLighting = 0; - } - ENCODE_INTO_SSSBUFFER(surfaceData, posInput.positionSS, outSSSBuffer); -#else - outColor = ApplyBlendMode(diffuseLighting, specularLighting, builtinData.opacity); - outColor = EvaluateAtmosphericScattering(posInput, V, outColor); -#endif - -#ifdef _WRITE_TRANSPARENT_MOTION_VECTOR - VaryingsPassToPS inputPass = UnpackVaryingsPassToPS(packedInput.vpass); - bool forceNoMotion = any(unity_MotionVectorsParams.yw == 0.0); - // outMotionVec is already initialize at the value of forceNoMotion (see above) - if (!forceNoMotion) - { - float2 motionVec = CalculateMotionVector(inputPass.positionCS, inputPass.previousPositionCS); - EncodeMotionVector(motionVec * 0.5, outMotionVec); - outMotionVec.zw = 1.0; - } -#endif - } - -#ifdef DEBUG_DISPLAY - } -#endif - -#ifdef _DEPTHOFFSET_ON - outputDepth = posInput.deviceDepth; -#endif -} diff --git a/com.unity.toonshader/Runtime/HDRP/Shaders/ShaderPassForwardHDRP7.hlsl.meta b/com.unity.toonshader/Runtime/HDRP/Shaders/ShaderPassForwardHDRP7.hlsl.meta deleted file mode 100644 index c0163f3c6..000000000 --- a/com.unity.toonshader/Runtime/HDRP/Shaders/ShaderPassForwardHDRP7.hlsl.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 1b4f1c7876302e04a81e6bd06cb9dd39 -ShaderImporter: - externalObjects: {} - defaultTextures: [] - nonModifiableTextures: [] - userData: - assetBundleName: - assetBundleVariant: