111
This commit is contained in:
27
Assets/ThirdParty/Tools/AmplifyImpostors/Plugins/Scripts/BakeHDRPTool/BakeHDRPTool.cs
vendored
Normal file
27
Assets/ThirdParty/Tools/AmplifyImpostors/Plugins/Scripts/BakeHDRPTool/BakeHDRPTool.cs
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
// Amplify Impostors
|
||||
// Copyright (c) Amplify Creations, Lda <info@amplify.pt>
|
||||
|
||||
//#define HDRP10
|
||||
using UnityEngine;
|
||||
using UnityEngine.Rendering;
|
||||
|
||||
namespace AmplifyImpostors
|
||||
{
|
||||
public class BakeHDRPTool
|
||||
{
|
||||
#if HDRP10
|
||||
static UnityEngine.Rendering.HighDefinition.ShaderVariablesGlobal g_globalShaderVariables = new UnityEngine.Rendering.HighDefinition.ShaderVariablesGlobal();
|
||||
public static void SetupShaderVariableGlobals( Matrix4x4 viewMat, Matrix4x4 projMatrix , CommandBuffer commandBuffer )
|
||||
{
|
||||
g_globalShaderVariables._ViewMatrix = viewMat;
|
||||
g_globalShaderVariables._InvViewMatrix = viewMat.inverse;
|
||||
g_globalShaderVariables._ProjMatrix = projMatrix;
|
||||
g_globalShaderVariables._ViewProjMatrix = projMatrix * viewMat;
|
||||
g_globalShaderVariables._WorldSpaceCameraPos_Internal = Vector4.zero;
|
||||
ConstantBuffer.PushGlobal( commandBuffer, g_globalShaderVariables, UnityEngine.Rendering.HighDefinition.HDShaderIDs._ShaderVariablesGlobal );
|
||||
}
|
||||
#else
|
||||
public static void SetupShaderVariableGlobals( Matrix4x4 viewMat, Matrix4x4 projMatrix , CommandBuffer commandBuffer ){/*This does nothing on HDRP lower that 10*/}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
11
Assets/ThirdParty/Tools/AmplifyImpostors/Plugins/Scripts/BakeHDRPTool/BakeHDRPTool.cs.meta
vendored
Normal file
11
Assets/ThirdParty/Tools/AmplifyImpostors/Plugins/Scripts/BakeHDRPTool/BakeHDRPTool.cs.meta
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e367a26cc52b15240b9dfc03c3537c16
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user