浏览代码

Added Custom post to have both before transparent and before stack. Created reference image for Postprocessing test

/Add-support-for-light-specular-color-tint
Andre McGrail 7 年前
当前提交
c6969950
共有 10 个文件被更改,包括 1199 次插入31 次删除
  1. 40
      Tests/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/028_PostProcessing_Custom.unity
  2. 23
      Tests/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/028_PostProcessing_Custom/Main Camera Profile.asset
  3. 6
      Tests/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/028_PostProcessing_Custom/Materials/TransparentMat_opaque.mat
  4. 10
      Tests/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/028_PostProcessing_Custom/Scripts/HalftoneOpaque.shader
  5. 1001
      ImageTemplates/LightweightPipeline/Scenes/027_PostProcessing.unity.png
  6. 77
      ImageTemplates/LightweightPipeline/Scenes/027_PostProcessing.unity.png.meta
  7. 18
      Tests/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/028_PostProcessing_Custom/Scripts/InvertOpaque.cs
  8. 13
      Tests/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/028_PostProcessing_Custom/Scripts/InvertOpaque.cs.meta
  9. 32
      Tests/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/028_PostProcessing_Custom/Scripts/InvertOpaque.shader
  10. 10
      Tests/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/028_PostProcessing_Custom/Scripts/InvertOpaque.shader.meta

40
Tests/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/028_PostProcessing_Custom.unity


m_TargetTexture: {fileID: 0}
m_TargetDisplay: 0
m_TargetEye: 3
m_HDR: 1
m_AllowMSAA: 1
m_HDR: 0
m_AllowMSAA: 0
m_AllowDynamicResolution: 0
m_ForceIntoRT: 1
m_OcclusionCulling: 1

volumeLayer:
serializedVersion: 2
m_Bits: 1
stopNaNPropagation: 1
antialiasingMode: 1
stopNaNPropagation: 0
antialiasingMode: 0
sharpen: 0.25
sharpness: 0.25
mobileOptimized: 1
mobileOptimized: 0
ambientOcclusion:
enabled: 0
mode: 1
ambientOnly: 0
scalableAO:
intensity: 0.5
radius: 0.25
quality: 2
color: {r: 0, g: 0, b: 0, a: 1}
multiScaleVO:
noiseFilterTolerance: 0
blurTolerance: -4.6
upsampleTolerance: -12
thicknessModifier: 1
intensity: 1
color: {r: 0, g: 0, b: 0, a: 1}
monitors:
debugLayer:
lightMeter:
width: 512
height: 256

vectorscope:
size: 256
exposure: 0.12
overlaySettings:
motionColorIntensity: 4
motionGridSize: 64
colorBlindnessType: 0
colorBlindnessStrength: 1
m_ShowRenderingFeatures: 0
m_BeforeTransparentBundles: []
m_BeforeTransparentBundles:
- assemblyQualifiedName: InvertOpaque, Assembly-CSharp, Version=0.0.0.0, Culture=neutral,
PublicKeyToken=null
m_BeforeStackBundles:
- assemblyQualifiedName: HalfToneOpaque, Assembly-CSharp, Version=0.0.0.0, Culture=neutral,
PublicKeyToken=null

23
Tests/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/028_PostProcessing_Custom/Main Camera Profile.asset


settings:
- {fileID: 114901213439182114}
- {fileID: 114764462675500970}
- {fileID: 114971891475011792}
--- !u!114 &114764462675500970
MonoBehaviour:
m_ObjectHideFlags: 3

m_Script: {fileID: 11500000, guid: 6050e2d5de785ce4d931e4dbdbf2d755, type: 3}
m_Name: ChromaticAberration
m_EditorClassIdentifier:
active: 1
active: 0
enabled:
overrideState: 1
value: 1

value: 1.01
scale:
overrideState: 1
value: 0.0027
value: 0.0053
steps:
overrideState: 1
value: 2

--- !u!114 &114971891475011792
MonoBehaviour:
m_ObjectHideFlags: 3
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 1ac41d3f11d084fe8ad95205b865e965, type: 3}
m_Name: InvertOpaque
m_EditorClassIdentifier:
active: 1
enabled:
overrideState: 1
value: 1
enable:
overrideState: 0
value: 0

6
Tests/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/028_PostProcessing_Custom/Materials/TransparentMat_opaque.mat


m_PrefabInternal: {fileID: 0}
m_Name: TransparentMat_opaque
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
m_ShaderKeywords: _ALPHABLEND_ON _GLOSSYREFLECTIONS_ON _METALLIC_SETUP _SPECULARHIGHLIGHTS_ON
m_ShaderKeywords: _ALPHABLEND_ON _METALLIC_SETUP
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0

m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}

10
Tests/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/028_PostProcessing_Custom/Scripts/HalftoneOpaque.shader


#include "../../../../../../../PostProcessing/PostProcessing/Shaders/StdLib.hlsl"
TEXTURE2D_SAMPLER2D(_MainTex, sampler_MainTex);
TEXTURE2D_SAMPLER2D(_Pattern, sampler_MainTex);
//TEXTURE2D_SAMPLER2D(_MainTex, sampler_MainTex);
Texture2D _Pattern;
Texture2D _MainTex;
SamplerState sampler_MainTex;
SamplerState sampler_Pattern;
//TEXTURE2D_SAMPLER2D(_Pattern, sampler_MainTex);
float _Blend;
float _Scale;
float _Steps;

float4 color = SAMPLE_TEXTURE2D(_MainTex, sampler_MainTex, i.texcoord);
float luminance = 1 + dot(color.rgb, float3(0.2126729, 0.7151522, 0.0721750)) * 0.25;
float3 pattern = SAMPLE_TEXTURE2D(_Pattern, sampler_MainTex, i.texcoord * (_ScreenParams.xy * _Scale * luminance)).rgb;
float3 pattern = SAMPLE_TEXTURE2D(_Pattern, sampler_Pattern, i.texcoord * (_ScreenParams.xy * _Scale * luminance)).rgb;
color.rgb = round(((pattern.rrr)-_Blend) + (color * _Steps)) / _Steps;
return color;
}

1001
ImageTemplates/LightweightPipeline/Scenes/027_PostProcessing.unity.png
文件差异内容过多而无法显示
查看文件

77
ImageTemplates/LightweightPipeline/Scenes/027_PostProcessing.unity.png.meta


fileFormatVersion: 2
guid: c40bd57fb760b4839a1ef80428356062
timeCreated: 1507026380
licenseType: Pro
TextureImporter:
fileIDToRecycleName: {}
externalObjects: {}
serializedVersion: 4
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
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:

18
Tests/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/028_PostProcessing_Custom/Scripts/InvertOpaque.cs


using System;
using UnityEngine;
using UnityEngine.Rendering.PostProcessing;
[Serializable]
[PostProcess(typeof(InvertOpaqueRenderer), PostProcessEvent.BeforeTransparent, "Custom/LWtest/Invert Opaque")]
public sealed class InvertOpaque : PostProcessEffectSettings {
public BoolParameter enable = new BoolParameter();
}
public sealed class InvertOpaqueRenderer : PostProcessEffectRenderer<InvertOpaque> {
public override void Render(PostProcessRenderContext context){
var sheet = context.propertySheets.Get(Shader.Find("Hidden/Custom/LWtest/InvertOpaque"));
context.command.BlitFullscreenTriangle(context.source, context.destination, sheet, 0);
}
}

13
Tests/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/028_PostProcessing_Custom/Scripts/InvertOpaque.cs.meta


fileFormatVersion: 2
guid: 1ac41d3f11d084fe8ad95205b865e965
timeCreated: 1505228902
licenseType: Pro
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

32
Tests/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/028_PostProcessing_Custom/Scripts/InvertOpaque.shader


Shader "Hidden/Custom/LWtest/InvertOpaque"
{
HLSLINCLUDE
#include "//Assets/PostProcessing/PostProcessing/Shaders/StdLib.hlsl"
TEXTURE2D_SAMPLER2D(_MainTex, sampler_MainTex);
float4 Frag(VaryingsDefault i) : SV_Target
{
float4 color = SAMPLE_TEXTURE2D(_MainTex, sampler_MainTex, i.texcoord);
return 1-color;
}
ENDHLSL
SubShader
{
Cull Off ZWrite Off ZTest Always
Pass
{
HLSLPROGRAM
#pragma vertex VertDefault
#pragma fragment Frag
ENDHLSL
}
}
}

10
Tests/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/028_PostProcessing_Custom/Scripts/InvertOpaque.shader.meta


fileFormatVersion: 2
guid: e92e494545f8e4589b242d0ad19799d5
timeCreated: 1505229290
licenseType: Pro
ShaderImporter:
externalObjects: {}
defaultTextures: []
userData:
assetBundleName:
assetBundleVariant:
正在加载...
取消
保存