浏览代码

Merge remote-tracking branch 'origin/master' into HDRP_GraphicTests

/main
Remy 7 年前
当前提交
d731c271
共有 6 个文件被更改,包括 121 次插入7 次删除
  1. 21
      ScriptableRenderPipeline/Core/CoreRP/ShaderLibrary/Common.hlsl
  2. 10
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Debug/DebugFullScreen.shader
  3. 2
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Decal/DecalProjectorComponent.cs.meta
  4. 2
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/HDRenderPipeline.cs
  5. 10
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/RenderPipelineResources/DecalGizmo.png
  6. 83
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/RenderPipelineResources/DecalGizmo.png.meta

21
ScriptableRenderPipeline/Core/CoreRP/ShaderLibrary/Common.hlsl


return faceID;
}
#endif // INTRINSIC_CUBEMAP_FACE_ID
// Intrinsic isnan can't be used because it require /Gic to be enabled on fxc that we can't do. So use IsNAN instead
bool IsNAN(float n)
{
return (n < 0.0 || n > 0.0 || n == 0.0) ? false : true;
}
bool IsNAN(float2 v)
{
return (IsNAN(v.x) || IsNAN(v.y)) ? true : false;
}
bool IsNAN(float3 v)
{
return (IsNAN(v.x) || IsNAN(v.y) || IsNAN(v.z)) ? true : false;
}
bool IsNAN(float4 v)
{
return (IsNAN(v.x) || IsNAN(v.y) || IsNAN(v.z) || IsNAN(v.w)) ? true : false;
}
// ----------------------------------------------------------------------------
// Common math functions

10
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Debug/DebugFullScreen.shader


#pragma fragment Frag
#include "CoreRP/ShaderLibrary/Common.hlsl"
#include "CoreRP/ShaderLibrary/Color.hlsl"
#include "../ShaderVariables.hlsl"
#include "../Debug/DebugDisplay.cs.hlsl"

if (_FullScreenDebugMode == FULLSCREENDEBUGMODE_NAN_TRACKER)
{
float4 color = SAMPLE_TEXTURE2D(_DebugFullScreenTexture, sampler_DebugFullScreenTexture, input.texcoord);
if (any(isnan(color)) || any(isinf(color)))
if (IsNAN(color) || any(isinf(color)))
color = float4(1.0, 0.0, 1.0, 1.0);
color = float4(1.0, 0.0, 0.0, 1.0);
// Dim the color buffer so we can see NaNs & Infs better
color.rgb *= 0.25;
color.rgb = Luminance(color.rgb).xxx;
}
return color;

2
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Decal/DecalProjectorComponent.cs.meta


serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
icon: {fileID: 2800000, guid: b057b73ec5a603e4aa80ccf4b34db0d3, type: 3}
userData:
assetBundleName:
assetBundleVariant:

2
ScriptableRenderPipeline/HDRenderPipeline/HDRP/HDRenderPipeline.cs


m_DebugFullScreen.SetFloat(HDShaderIDs._RequireToFlipInputTexture, hdCamera.camera.cameraType != CameraType.SceneView ? 1.0f : 0.0f);
CoreUtils.DrawFullScreen(cmd, m_DebugFullScreen, (RenderTargetIdentifier)BuiltinRenderTextureType.CameraTarget);
PushColorPickerDebugTexture(cmd, m_DebugFullScreenTempRT, hdCamera);
PushColorPickerDebugTexture(cmd, (RenderTargetIdentifier)BuiltinRenderTextureType.CameraTarget, hdCamera);
}
// Then overlays

10
ScriptableRenderPipeline/HDRenderPipeline/HDRP/RenderPipelineResources/DecalGizmo.png

之前 之后
宽度: 128  |  高度: 128  |  大小: 4.4 KiB

83
ScriptableRenderPipeline/HDRenderPipeline/HDRP/RenderPipelineResources/DecalGizmo.png.meta


fileFormatVersion: 2
guid: b057b73ec5a603e4aa80ccf4b34db0d3
TextureImporter:
fileIDToRecycleName: {}
externalObjects: {}
serializedVersion: 5
mipmaps:
mipMapMode: 0
enableMipMap: 1
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: -1
aniso: -1
mipBias: -1
wrapU: -1
wrapV: -1
wrapW: -1
nPOTScale: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaUsage: 1
alphaIsTransparency: 0
spriteTessellationDetail: -1
textureType: 0
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- serializedVersion: 2
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
vertices: []
indices:
edges: []
weights: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:
正在加载...
取消
保存