André McGrail
4 年前
当前提交
ff8ee98f
共有 12 个文件被更改,包括 1463 次插入 和 46 次删除
-
42Assets/Scripts/_Test/CustomPP/PsudoLensFlare/PseudoFlareVolume.cs
-
94Assets/Scripts/_Test/CustomPP/PsudoLensFlare/PseudoLensflareFeature.cs
-
150Assets/Scripts/_Test/CustomPP/PsudoLensFlare/PsudoLenflare.shader
-
4Assets/Scripts/_Test/CustomPP/PsudoLensFlare/PsudoLenflare.shader.meta
-
8Assets/Scripts/_Test.meta
-
8Assets/Scripts/_Test/CustomPP.meta
-
1001Assets/Scripts/_Test/CustomPP/PsudoLensFlare/10.jpg
-
106Assets/Scripts/_Test/CustomPP/PsudoLensFlare/10.jpg.meta
-
32Assets/Scripts/_Test/CustomPP/PsudoLensFlare/Hidden_PostFX_PseudoLensFlare.mat
-
8Assets/Scripts/_Test/CustomPP/PsudoLensFlare/Hidden_PostFX_PseudoLensFlare.mat.meta
-
48Assets/Scripts/_Test/CustomPP/PsudoLensFlare/PseudoFlare.asset
-
8Assets/Scripts/_Test/CustomPP/PsudoLensFlare/PseudoFlare.asset.meta
|
|||
using System; |
|||
using UnityEngine; |
|||
using UnityEngine.Rendering; |
|||
using UnityEngine.Rendering.Universal; |
|||
[Range(0f, 1f), Tooltip("Grayscale effect intensity")] |
|||
public FloatParameter blend = new FloatParameter(0.5f); |
|||
|
|||
public BoolParameter enabled = new BoolParameter(false); |
|||
[Range(-10f, 10f), Tooltip("Grayscale effect intensity")] |
|||
public FloatParameter offset = new FloatParameter(0.0f); |
|||
[Range(0f, 10f), Tooltip("Grayscale effect intensity")] |
|||
public FloatParameter power = new FloatParameter(1.0f); |
|||
|
|||
public FloatParameter ghostSpacing = new FloatParameter(0.25f); |
|||
public IntParameter ghostCount = new IntParameter(3); |
|||
public FloatParameter haloWidth = new FloatParameter(1.0f); |
|||
|
|||
protected override void OnEnable() |
|||
{ |
|||
base.OnEnable(); |
|||
|
|||
//RenderPipelineManager.beginCameraRendering += Inject;
|
|||
} |
|||
|
|||
protected override void OnDisable() |
|||
{ |
|||
base.OnDisable(); |
|||
|
|||
//RenderPipelineManager.beginCameraRendering -= Inject;
|
|||
} |
|||
|
|||
private void Inject(ScriptableRenderContext context, Camera camera) |
|||
{ |
|||
PseudoFlareVolume component = VolumeManager.instance.stack.GetComponent(typeof(PseudoFlareVolume)) as PseudoFlareVolume; |
|||
if (component == null || !component.enabled.value) |
|||
{ |
|||
Debug.Log($"no volume component in camera {camera.name}"); |
|||
return; |
|||
} |
|||
|
|||
var renderer = camera.GetUniversalAdditionalCameraData().scriptableRenderer; |
|||
|
|||
Debug.Log($"effect volume {renderer}"); |
|||
PseudoLensflareFeature.InjectPass(renderer, new PseudoLensflareFeature.PseudoLensflarePass(new Material(Shader.Find("Hidden/PostFX/PseudoLensFlare")))); |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: 54f6c326c0c534bc6a69775d6981fcc9 |
|||
folderAsset: yes |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
guid: debc907df84854b5180ea4d11942e90f |
|||
folderAsset: yes |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
1001
Assets/Scripts/_Test/CustomPP/PsudoLensFlare/10.jpg
文件差异内容过多而无法显示
查看文件
文件差异内容过多而无法显示
查看文件
|
|||
fileFormatVersion: 2 |
|||
guid: c84063caa820d4d3d841494090dd8052 |
|||
TextureImporter: |
|||
internalIDToNameTable: [] |
|||
externalObjects: {} |
|||
serializedVersion: 11 |
|||
mipmaps: |
|||
mipMapMode: 0 |
|||
enableMipMap: 0 |
|||
sRGBTexture: 0 |
|||
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 |
|||
streamingMipmaps: 0 |
|||
streamingMipmapsPriority: 0 |
|||
vTOnly: 0 |
|||
grayScaleToAlpha: 0 |
|||
generateCubemap: 6 |
|||
cubemapConvolution: 0 |
|||
seamlessCubemap: 0 |
|||
textureFormat: 1 |
|||
maxTextureSize: 2048 |
|||
textureSettings: |
|||
serializedVersion: 2 |
|||
filterMode: 2 |
|||
aniso: -1 |
|||
mipBias: -100 |
|||
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} |
|||
spritePixelsToUnits: 100 |
|||
spriteBorder: {x: 0, y: 0, z: 0, w: 0} |
|||
spriteGenerateFallbackPhysicsShape: 1 |
|||
alphaUsage: 1 |
|||
alphaIsTransparency: 0 |
|||
spriteTessellationDetail: -1 |
|||
textureType: 10 |
|||
textureShape: 1 |
|||
singleChannelComponent: 1 |
|||
maxTextureSizeSet: 0 |
|||
compressionQualitySet: 0 |
|||
textureFormatSet: 0 |
|||
ignorePngGamma: 0 |
|||
applyGammaDecoding: 0 |
|||
platformSettings: |
|||
- serializedVersion: 3 |
|||
buildTarget: DefaultTexturePlatform |
|||
maxTextureSize: 2048 |
|||
resizeAlgorithm: 0 |
|||
textureFormat: -1 |
|||
textureCompression: 2 |
|||
compressionQuality: 50 |
|||
crunchedCompression: 0 |
|||
allowsAlphaSplitting: 0 |
|||
overridden: 0 |
|||
androidETC2FallbackOverride: 0 |
|||
forceMaximumCompressionQuality_BC6H_BC7: 0 |
|||
- serializedVersion: 3 |
|||
buildTarget: Standalone |
|||
maxTextureSize: 2048 |
|||
resizeAlgorithm: 0 |
|||
textureFormat: -1 |
|||
textureCompression: 2 |
|||
compressionQuality: 50 |
|||
crunchedCompression: 0 |
|||
allowsAlphaSplitting: 0 |
|||
overridden: 0 |
|||
androidETC2FallbackOverride: 0 |
|||
forceMaximumCompressionQuality_BC6H_BC7: 0 |
|||
spriteSheet: |
|||
serializedVersion: 2 |
|||
sprites: [] |
|||
outline: [] |
|||
physicsShape: [] |
|||
bones: [] |
|||
spriteID: |
|||
internalID: 0 |
|||
vertices: [] |
|||
indices: |
|||
edges: [] |
|||
weights: [] |
|||
secondaryTextures: [] |
|||
spritePackingTag: |
|||
pSDRemoveMatte: 0 |
|||
pSDShowRemoveMatteOption: 0 |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
%YAML 1.1 |
|||
%TAG !u! tag:unity3d.com,2011: |
|||
--- !u!21 &2100000 |
|||
Material: |
|||
serializedVersion: 6 |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_Name: Hidden_PostFX_PseudoLensFlare |
|||
m_Shader: {fileID: 4800000, guid: 933b5941d4ae5084a92ee525b3fe5d28, type: 3} |
|||
m_ShaderKeywords: |
|||
m_LightmapFlags: 4 |
|||
m_EnableInstancingVariants: 0 |
|||
m_DoubleSidedGI: 0 |
|||
m_CustomRenderQueue: -1 |
|||
stringTagMap: {} |
|||
disabledShaderPasses: [] |
|||
m_SavedProperties: |
|||
serializedVersion: 3 |
|||
m_TexEnvs: |
|||
- _MainTex: |
|||
m_Texture: {fileID: 0} |
|||
m_Scale: {x: 1, y: 1} |
|||
m_Offset: {x: 0, y: 0} |
|||
- _StarTexture: |
|||
m_Texture: {fileID: 2800000, guid: c84063caa820d4d3d841494090dd8052, type: 3} |
|||
m_Scale: {x: 1, y: 1} |
|||
m_Offset: {x: 0, y: 0} |
|||
m_Floats: [] |
|||
m_Colors: [] |
|||
m_BuildTextureStacks: [] |
|
|||
fileFormatVersion: 2 |
|||
guid: 34a190576a5724c6cbdbfe682e2f3671 |
|||
NativeFormatImporter: |
|||
externalObjects: {} |
|||
mainObjectFileID: 0 |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
%YAML 1.1 |
|||
%TAG !u! tag:unity3d.com,2011: |
|||
--- !u!114 &11400000 |
|||
MonoBehaviour: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 0} |
|||
m_Enabled: 1 |
|||
m_EditorHideFlags: 0 |
|||
m_Script: {fileID: 11500000, guid: d7fd9488000d3734a9e00ee676215985, type: 3} |
|||
m_Name: PseudoFlare |
|||
m_EditorClassIdentifier: |
|||
components: |
|||
- {fileID: 8989136020346695368} |
|||
--- !u!114 &8989136020346695368 |
|||
MonoBehaviour: |
|||
m_ObjectHideFlags: 3 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 0} |
|||
m_Enabled: 1 |
|||
m_EditorHideFlags: 0 |
|||
m_Script: {fileID: 11500000, guid: 89201a0f12f0ed4479dc17dd1184d946, type: 3} |
|||
m_Name: PseudoFlareVolume |
|||
m_EditorClassIdentifier: |
|||
active: 1 |
|||
m_AdvancedMode: 0 |
|||
enabled: |
|||
m_OverrideState: 1 |
|||
m_Value: 1 |
|||
offset: |
|||
m_OverrideState: 1 |
|||
m_Value: -1.51 |
|||
power: |
|||
m_OverrideState: 1 |
|||
m_Value: 0.76 |
|||
ghostSpacing: |
|||
m_OverrideState: 1 |
|||
m_Value: 0.57 |
|||
ghostCount: |
|||
m_OverrideState: 1 |
|||
m_Value: 4 |
|||
haloWidth: |
|||
m_OverrideState: 1 |
|||
m_Value: 0.45 |
|
|||
fileFormatVersion: 2 |
|||
guid: f979669a5f9bf4a4db7e28cc61423f02 |
|||
NativeFormatImporter: |
|||
externalObjects: {} |
|||
mainObjectFileID: 0 |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
撰写
预览
正在加载...
取消
保存
Reference in new issue