ether shader modified to work with spectrum
This commit is contained in:
1 parent
a2f0ed170b
commit
8e9f8c598f
41 files changed
+2982
-260
No files matched your search
@@ -0,0 +1,263 @@
|
||||
%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: Bubbles
|
||||
m_Shader: {fileID: 4800000, guid: e0849fcaa86caca4dbb74fbcd71dc592, type: 3}
|
||||
m_ShaderKeywords: _DISABLE_SSR_TRANSPARENT _NORMALMAP_TANGENT_SPACE
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses:
|
||||
- TransparentDepthPrepass
|
||||
- TransparentDepthPostpass
|
||||
- TransparentBackface
|
||||
- RayTracingPrepass
|
||||
- MOTIONVECTORS
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _AnisotropyMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _BaseColorMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _BentNormalMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _BentNormalMapOS:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _CoatMaskMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _EmissiveColorMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _HeightMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _IridescenceMaskMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _IridescenceThicknessMap:
|
||||
m_Texture: {fileID: 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}
|
||||
- _MaskMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _NormalMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _NormalMapOS:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _SpecularColorMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _SubsurfaceMaskMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _TangentMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _TangentMapOS:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _ThicknessMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _TransmittanceColorMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_Lightmaps:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_LightmapsInd:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_ShadowMasks:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _AORemapMax: 1
|
||||
- _AORemapMin: 0
|
||||
- _ATDistance: 1
|
||||
- _AddPrecomputedVelocity: 0
|
||||
- _AlbedoAffectEmissive: 0
|
||||
- _AlphaCutoff: 0.5
|
||||
- _AlphaCutoffEnable: 0
|
||||
- _AlphaCutoffPostpass: 0.5
|
||||
- _AlphaCutoffPrepass: 0.5
|
||||
- _AlphaCutoffShadow: 0.5
|
||||
- _AlphaDstBlend: 0
|
||||
- _AlphaSrcBlend: 1
|
||||
- _AlphaToMask: 0
|
||||
- _AlphaToMaskInspectorValue: 0
|
||||
- _Anisotropy: 0
|
||||
- _BlendMode: 0
|
||||
- _CoatMask: 0
|
||||
- _CullMode: 2
|
||||
- _CullModeForward: 2
|
||||
- _Cutoff: 0.5
|
||||
- _DepthOffsetEnable: 0
|
||||
- _DetailAlbedoScale: 1
|
||||
- _DetailNormalScale: 1
|
||||
- _DetailSmoothnessScale: 1
|
||||
- _DiffusionProfile: 0
|
||||
- _DiffusionProfileHash: 0
|
||||
- _DisplacementLockObjectScale: 1
|
||||
- _DisplacementLockTilingScale: 1
|
||||
- _DisplacementMode: 0
|
||||
- _DoubleSidedEnable: 0
|
||||
- _DoubleSidedGIMode: 0
|
||||
- _DoubleSidedNormalMode: 1
|
||||
- _DstBlend: 0
|
||||
- _EmissiveColorMode: 1
|
||||
- _EmissiveExposureWeight: 1
|
||||
- _EmissiveIntensity: 1
|
||||
- _EmissiveIntensityUnit: 0
|
||||
- _EnableBlendModePreserveSpecularLighting: 1
|
||||
- _EnableFogOnTransparent: 1
|
||||
- _EnableGeometricSpecularAA: 0
|
||||
- _EnergyConservingSpecularColor: 1
|
||||
- _HeightAmplitude: 0.02
|
||||
- _HeightCenter: 0.5
|
||||
- _HeightMapParametrization: 0
|
||||
- _HeightMax: 1
|
||||
- _HeightMin: -1
|
||||
- _HeightOffset: 0
|
||||
- _HeightPoMAmplitude: 2
|
||||
- _HeightTessAmplitude: 2
|
||||
- _HeightTessCenter: 0.5
|
||||
- _InvTilingScale: 1
|
||||
- _Ior: 1.5
|
||||
- _IridescenceMask: 1
|
||||
- _IridescenceThickness: 1
|
||||
- _LinkDetailsWithBase: 1
|
||||
- _MaterialID: 1
|
||||
- _Metallic: 0
|
||||
- _MetallicRemapMax: 1
|
||||
- _MetallicRemapMin: 0
|
||||
- _NormalMapSpace: 0
|
||||
- _NormalScale: 1
|
||||
- _OpaqueCullMode: 2
|
||||
- _PPDLodThreshold: 5
|
||||
- _PPDMaxSamples: 15
|
||||
- _PPDMinSamples: 5
|
||||
- _PPDPrimitiveLength: 1
|
||||
- _PPDPrimitiveWidth: 1
|
||||
- _RayTracing: 0
|
||||
- _ReceivesSSR: 1
|
||||
- _ReceivesSSRTransparent: 0
|
||||
- _RefractionModel: 0
|
||||
- _Smoothness: 0.5
|
||||
- _SmoothnessRemapMax: 1
|
||||
- _SmoothnessRemapMin: 0
|
||||
- _SpecularAAScreenSpaceVariance: 0.1
|
||||
- _SpecularAAThreshold: 0.2
|
||||
- _SpecularOcclusionMode: 1
|
||||
- _SrcBlend: 1
|
||||
- _StencilRef: 0
|
||||
- _StencilRefDepth: 8
|
||||
- _StencilRefGBuffer: 10
|
||||
- _StencilRefMV: 40
|
||||
- _StencilWriteMask: 6
|
||||
- _StencilWriteMaskDepth: 8
|
||||
- _StencilWriteMaskGBuffer: 14
|
||||
- _StencilWriteMaskMV: 40
|
||||
- _SubsurfaceMask: 1
|
||||
- _SupportDecals: 1
|
||||
- _SurfaceType: 0
|
||||
- _TexWorldScale: 1
|
||||
- _TexWorldScaleEmissive: 1
|
||||
- _Thickness: 1
|
||||
- _TransmissionEnable: 1
|
||||
- _TransparentBackfaceEnable: 0
|
||||
- _TransparentCullMode: 2
|
||||
- _TransparentDepthPostpassEnable: 0
|
||||
- _TransparentDepthPrepassEnable: 0
|
||||
- _TransparentSortPriority: 0
|
||||
- _TransparentWritingMotionVec: 0
|
||||
- _TransparentZWrite: 0
|
||||
- _UVBase: 0
|
||||
- _UVDetail: 0
|
||||
- _UVEmissive: 0
|
||||
- _UseEmissiveIntensity: 0
|
||||
- _UseShadowThreshold: 0
|
||||
- _ZTestDepthEqualForOpaque: 3
|
||||
- _ZTestGBuffer: 4
|
||||
- _ZTestTransparent: 4
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _BaseColorMap_MipInfo: {r: 0, g: 0, b: 0, a: 0}
|
||||
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _DiffusionProfileAsset: {r: 0, g: 0, b: 0, a: 0}
|
||||
- _DoubleSidedConstants: {r: 1, g: 1, b: -1, a: 0}
|
||||
- _EmissionColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _EmissiveColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _EmissiveColorLDR: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _InvPrimScale: {r: 1, g: 1, b: 0, a: 0}
|
||||
- _IridescenceThicknessRemap: {r: 0, g: 1, b: 0, a: 0}
|
||||
- _SpecularColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _ThicknessRemap: {r: 0, g: 1, b: 0, a: 0}
|
||||
- _TransmittanceColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _UVDetailsMappingMask: {r: 1, g: 0, b: 0, a: 0}
|
||||
- _UVMappingMask: {r: 1, g: 0, b: 0, a: 0}
|
||||
- _UVMappingMaskEmissive: {r: 1, g: 0, b: 0, a: 0}
|
||||
m_BuildTextureStacks: []
|
||||
--- !u!114 &8642687853890746339
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 11
|
||||
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: da692e001514ec24dbc4cca1949ff7e8, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
version: 12
|
||||
hdPluginSubTargetMaterialVersions:
|
||||
m_Keys: []
|
||||
m_Values:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 299029e20bc4e4d4ea794ac529b479fa
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,102 @@
|
||||
Shader "Kaiju/Bubbles"
|
||||
{
|
||||
HLSLINCLUDE
|
||||
|
||||
#pragma vertex Vert
|
||||
|
||||
#pragma target 4.5
|
||||
#pragma only_renderers d3d11 playstation xboxone xboxseries vulkan metal switch
|
||||
|
||||
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/CustomPass/CustomPassCommon.hlsl"
|
||||
|
||||
// The PositionInputs struct allow you to retrieve a lot of useful information for your fullScreenShader:
|
||||
// struct PositionInputs
|
||||
// {
|
||||
// float3 positionWS; // World space position (could be camera-relative)
|
||||
// float2 positionNDC; // Normalized screen coordinates within the viewport : [0, 1) (with the half-pixel offset)
|
||||
// uint2 positionSS; // Screen space pixel coordinates : [0, NumPixels)
|
||||
// uint2 tileCoord; // Screen tile coordinates : [0, NumTiles)
|
||||
// float deviceDepth; // Depth from the depth buffer : [0, 1] (typically reversed)
|
||||
// float linearDepth; // View space Z coordinate : [Near, Far]
|
||||
// };
|
||||
|
||||
// To sample custom buffers, you have access to these functions:
|
||||
// But be careful, on most platforms you can't sample to the bound color buffer. It means that you
|
||||
// can't use the SampleCustomColor when the pass color buffer is set to custom (and same for camera the buffer).
|
||||
// float4 SampleCustomColor(float2 uv);
|
||||
// float4 LoadCustomColor(uint2 pixelCoords);
|
||||
// float LoadCustomDepth(uint2 pixelCoords);
|
||||
// float SampleCustomDepth(float2 uv);
|
||||
|
||||
// There are also a lot of utility function you can use inside Common.hlsl and Color.hlsl,
|
||||
// you can check them out in the source code of the core SRP package.
|
||||
|
||||
float4 FullScreenPass(Varyings varyings) : SV_Target
|
||||
{
|
||||
UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(varyings);
|
||||
float depth = LoadCameraDepth(varyings.positionCS.xy);
|
||||
PositionInputs posInput = GetPositionInput(varyings.positionCS.xy, _ScreenSize.zw, depth, UNITY_MATRIX_I_VP, UNITY_MATRIX_V);
|
||||
float3 viewDirection = GetWorldSpaceNormalizeViewDir(posInput.positionWS);
|
||||
float4 color = float4(0.0, 0.0, 0.0, 0.0);
|
||||
|
||||
// Load the camera color buffer at the mip 0 if we're not at the before rendering injection point
|
||||
if (_CustomPassInjectionPoint != CUSTOMPASSINJECTIONPOINT_BEFORE_RENDERING)
|
||||
color = float4(CustomPassLoadCameraColor(varyings.positionCS.xy, 0), 1);
|
||||
|
||||
|
||||
// get uv
|
||||
float2 uv = posInput.positionNDC;
|
||||
// fix aspect ratio
|
||||
uv.x *= _ScreenParams.x / _ScreenParams.y;
|
||||
|
||||
// Background
|
||||
float4 outColour = float4(0.8+0.2*uv.y,0.8+0.2*uv.y,0.8+0.2*uv.y,1);
|
||||
|
||||
// [unroll(100)]
|
||||
for( int i=0; i<40; i++ ) {
|
||||
// bubble seeds
|
||||
float pha = sin(float(i)*546.13+1.0)*0.5 + 0.5;
|
||||
float siz = pow( sin(float(i)*651.74+5.0)*0.5 + 0.5, 4.0 );
|
||||
float pox = sin(float(i)*321.55+4.1) * 1 / 1;
|
||||
|
||||
// buble size, position and color
|
||||
float rad = 0.1 + 0.5*siz;
|
||||
float2 pos = float2( pox, -1.0-rad + (2.0+2.0*rad)*fmod(pha+0.1*_Time.y*(0.2+0.8*siz),1.0));
|
||||
float dis = length( uv - pos );
|
||||
float3 col = lerp( float3(0.94,0.3,0.0), float3(0.1,0.4,0.8), 0.5+0.5*sin(float(i)*1.2+1.9));
|
||||
col+= 8.0*smoothstep( rad*0.95, rad, dis );
|
||||
|
||||
// render
|
||||
float f = length(uv-pos)/rad;
|
||||
f = sqrt(clamp(1.0-f*f,0.0,1.0));
|
||||
outColour -= float4(col.zyx *(1.0-smoothstep( rad*0.95, rad, dis )) * f, 0.0);
|
||||
}
|
||||
|
||||
// Vignetting
|
||||
outColour *= sqrt(1.5-0.5*length(uv));
|
||||
|
||||
return outColour;
|
||||
|
||||
}
|
||||
|
||||
ENDHLSL
|
||||
|
||||
SubShader
|
||||
{
|
||||
Tags{ "RenderPipeline" = "HDRenderPipeline" }
|
||||
Pass
|
||||
{
|
||||
Name "Custom Pass 0"
|
||||
|
||||
ZWrite Off
|
||||
ZTest Always
|
||||
Blend SrcAlpha OneMinusSrcAlpha
|
||||
Cull Off
|
||||
|
||||
HLSLPROGRAM
|
||||
#pragma fragment FullScreenPass
|
||||
ENDHLSL
|
||||
}
|
||||
}
|
||||
Fallback Off
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e0849fcaa86caca4dbb74fbcd71dc592
|
||||
ShaderImporter:
|
||||
externalObjects: {}
|
||||
defaultTextures: []
|
||||
nonModifiableTextures: []
|
||||
preprocessorOverride: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,279 @@
|
||||
%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: Ether
|
||||
m_Shader: {fileID: 4800000, guid: b601654b5e3e3c9499262340b8fa2412, type: 3}
|
||||
m_ShaderKeywords: _DISABLE_SSR_TRANSPARENT _NORMALMAP_TANGENT_SPACE
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses:
|
||||
- TransparentDepthPrepass
|
||||
- TransparentDepthPostpass
|
||||
- TransparentBackface
|
||||
- RayTracingPrepass
|
||||
- MOTIONVECTORS
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _AnisotropyMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _BaseColorMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _BentNormalMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _BentNormalMapOS:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _CoatMaskMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _EmissiveColorMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _HeightMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _IridescenceMaskMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _IridescenceThicknessMap:
|
||||
m_Texture: {fileID: 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}
|
||||
- _MaskMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _NormalMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _NormalMapOS:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _SpectrumTexture:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _SpecularColorMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _SubsurfaceMaskMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _TangentMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _TangentMapOS:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _ThemeTexture:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _ThicknessMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _TransmittanceColorMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_Lightmaps:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_LightmapsInd:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_ShadowMasks:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _AORemapMax: 1
|
||||
- _AORemapMin: 0
|
||||
- _ATDistance: 1
|
||||
- _AddPrecomputedVelocity: 0
|
||||
- _AlbedoAffectEmissive: 0
|
||||
- _AlphaCutoff: 0.5
|
||||
- _AlphaCutoffEnable: 0
|
||||
- _AlphaCutoffPostpass: 0.5
|
||||
- _AlphaCutoffPrepass: 0.5
|
||||
- _AlphaCutoffShadow: 0.5
|
||||
- _AlphaDstBlend: 0
|
||||
- _AlphaSrcBlend: 1
|
||||
- _AlphaToMask: 0
|
||||
- _AlphaToMaskInspectorValue: 0
|
||||
- _Anisotropy: 0
|
||||
- _BlendMode: 0
|
||||
- _CoatMask: 0
|
||||
- _CullMode: 2
|
||||
- _CullModeForward: 2
|
||||
- _Cutoff: 0.5
|
||||
- _DepthOffsetEnable: 0
|
||||
- _DetailAlbedoScale: 1
|
||||
- _DetailNormalScale: 1
|
||||
- _DetailSmoothnessScale: 1
|
||||
- _DiffusionProfile: 0
|
||||
- _DiffusionProfileHash: 0
|
||||
- _DisplacementLockObjectScale: 1
|
||||
- _DisplacementLockTilingScale: 1
|
||||
- _DisplacementMode: 0
|
||||
- _DoubleSidedEnable: 0
|
||||
- _DoubleSidedGIMode: 0
|
||||
- _DoubleSidedNormalMode: 1
|
||||
- _DstBlend: 0
|
||||
- _EmissiveColorMode: 1
|
||||
- _EmissiveExposureWeight: 1
|
||||
- _EmissiveIntensity: 1
|
||||
- _EmissiveIntensityUnit: 0
|
||||
- _EnableBlendModePreserveSpecularLighting: 1
|
||||
- _EnableFogOnTransparent: 1
|
||||
- _EnableGeometricSpecularAA: 0
|
||||
- _EnergyConservingSpecularColor: 1
|
||||
- _HeightAmplitude: 0.02
|
||||
- _HeightCenter: 0.5
|
||||
- _HeightMapParametrization: 0
|
||||
- _HeightMax: 1
|
||||
- _HeightMin: -1
|
||||
- _HeightOffset: 0
|
||||
- _HeightPoMAmplitude: 2
|
||||
- _HeightTessAmplitude: 2
|
||||
- _HeightTessCenter: 0.5
|
||||
- _InvTilingScale: 1
|
||||
- _Ior: 1.5
|
||||
- _IridescenceMask: 1
|
||||
- _IridescenceThickness: 1
|
||||
- _LinkDetailsWithBase: 1
|
||||
- _Magic: 65.6
|
||||
- _MaterialID: 1
|
||||
- _Metallic: 0
|
||||
- _MetallicRemapMax: 1
|
||||
- _MetallicRemapMin: 0
|
||||
- _NormalMapSpace: 0
|
||||
- _NormalScale: 1
|
||||
- _OpaqueCullMode: 2
|
||||
- _PPDLodThreshold: 5
|
||||
- _PPDMaxSamples: 15
|
||||
- _PPDMinSamples: 5
|
||||
- _PPDPrimitiveLength: 1
|
||||
- _PPDPrimitiveWidth: 1
|
||||
- _RayTracing: 0
|
||||
- _ReceivesSSR: 1
|
||||
- _ReceivesSSRTransparent: 0
|
||||
- _RefractionModel: 0
|
||||
- _Smoothness: 0.5
|
||||
- _SmoothnessRemapMax: 1
|
||||
- _SmoothnessRemapMin: 0
|
||||
- _SpectrumSize: 4
|
||||
- _SpecularAAScreenSpaceVariance: 0.1
|
||||
- _SpecularAAThreshold: 0.2
|
||||
- _SpecularOcclusionMode: 1
|
||||
- _SrcBlend: 1
|
||||
- _StencilRef: 0
|
||||
- _StencilRefDepth: 8
|
||||
- _StencilRefGBuffer: 10
|
||||
- _StencilRefMV: 40
|
||||
- _StencilWriteMask: 6
|
||||
- _StencilWriteMaskDepth: 8
|
||||
- _StencilWriteMaskGBuffer: 14
|
||||
- _StencilWriteMaskMV: 40
|
||||
- _SubsurfaceMask: 1
|
||||
- _SupportDecals: 1
|
||||
- _SurfaceType: 0
|
||||
- _TexWorldScale: 1
|
||||
- _TexWorldScaleEmissive: 1
|
||||
- _ThemeStrength: 4.67
|
||||
- _Thickness: 1
|
||||
- _TransmissionEnable: 1
|
||||
- _TransparentBackfaceEnable: 0
|
||||
- _TransparentCullMode: 2
|
||||
- _TransparentDepthPostpassEnable: 0
|
||||
- _TransparentDepthPrepassEnable: 0
|
||||
- _TransparentSortPriority: 0
|
||||
- _TransparentWritingMotionVec: 0
|
||||
- _TransparentZWrite: 0
|
||||
- _UVBase: 0
|
||||
- _UVDetail: 0
|
||||
- _UVEmissive: 0
|
||||
- _UseEmissiveIntensity: 0
|
||||
- _UseShadowThreshold: 0
|
||||
- _Wildness: 4
|
||||
- _Wow: 4
|
||||
- _ZTestDepthEqualForOpaque: 3
|
||||
- _ZTestGBuffer: 4
|
||||
- _ZTestTransparent: 4
|
||||
- _ZWrite: 1
|
||||
- _Zing: 0
|
||||
- _Zip: 0.5
|
||||
- _Zoom: -0.5
|
||||
m_Colors:
|
||||
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _BaseColorMap_MipInfo: {r: 0, g: 0, b: 0, a: 0}
|
||||
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _DiffusionProfileAsset: {r: 0, g: 0, b: 0, a: 0}
|
||||
- _DoubleSidedConstants: {r: 1, g: 1, b: -1, a: 0}
|
||||
- _EmissionColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _EmissiveColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _EmissiveColorLDR: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _InvPrimScale: {r: 1, g: 1, b: 0, a: 0}
|
||||
- _IridescenceThicknessRemap: {r: 0, g: 1, b: 0, a: 0}
|
||||
- _SpecularColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _ThicknessRemap: {r: 0, g: 1, b: 0, a: 0}
|
||||
- _TransmittanceColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _UVDetailsMappingMask: {r: 1, g: 0, b: 0, a: 0}
|
||||
- _UVMappingMask: {r: 1, g: 0, b: 0, a: 0}
|
||||
- _UVMappingMaskEmissive: {r: 1, g: 0, b: 0, a: 0}
|
||||
m_BuildTextureStacks: []
|
||||
--- !u!114 &6020743418383276577
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 11
|
||||
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: da692e001514ec24dbc4cca1949ff7e8, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
version: 12
|
||||
hdPluginSubTargetMaterialVersions:
|
||||
m_Keys: []
|
||||
m_Values:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9fcc8d607974bb04caf93063084ba52f
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,105 @@
|
||||
Shader "FullScreen/Ether"
|
||||
{
|
||||
Properties
|
||||
{
|
||||
_SpectrumTexture("SpectrumTexture", 2D) = "white" {}
|
||||
_ThemeTexture("ThemeTexture", 2D) = "white" {}
|
||||
_SpectrumSize("SpectrumSize", float) = 16
|
||||
|
||||
_Zoom("Zoom", range(-2, 2)) = 0.5
|
||||
_Wildness("Wildness", range(1, 10)) = 4.0
|
||||
_ThemeStrength("ThemeStrength", range(1, 10)) = 4.0
|
||||
}
|
||||
|
||||
HLSLINCLUDE
|
||||
|
||||
// HDRP stuff
|
||||
#pragma vertex Vert
|
||||
#pragma target 4.5
|
||||
#pragma only_renderers d3d11 playstation xboxone xboxseries vulkan metal switch
|
||||
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/CustomPass/CustomPassCommon.hlsl"
|
||||
|
||||
// here we go...
|
||||
sampler2D _SpectrumTexture;
|
||||
sampler2D _ThemeTexture;
|
||||
float _Zoom;
|
||||
float _Wildness;
|
||||
float _ThemeStrength;
|
||||
|
||||
// matrix fn
|
||||
float2x2 m(float a) {
|
||||
float c=cos(a), s=sin(a);
|
||||
float2x2 mat = { c, -s, s, c };
|
||||
return mat;
|
||||
}
|
||||
|
||||
float map(float3 p, float4 spectrum) {
|
||||
float t = _Time.y * 0.2;
|
||||
p.xz = mul(m(t), p.xz);
|
||||
p.xy = mul(m(t), p.xy);
|
||||
float3 q = p*_Wildness;
|
||||
return length(p +
|
||||
float3(sin(t), sin(t), sin(t)))
|
||||
*log(length(p)+_Zoom) + sin(q.x+sin(q.z+sin(q.y))) * spectrum.x;
|
||||
}
|
||||
|
||||
float4 FullScreenPass(Varyings varyings) : SV_Target {
|
||||
float depth = LoadCameraDepth(varyings.positionCS.xy);
|
||||
PositionInputs posInput = GetPositionInput(varyings.positionCS.xy, _ScreenSize.zw, depth, UNITY_MATRIX_I_VP, UNITY_MATRIX_V);
|
||||
|
||||
// musique
|
||||
float sub = tex2D(_SpectrumTexture, 0.0);
|
||||
float bass = tex2D(_SpectrumTexture, 0.25);
|
||||
float mids = tex2D(_SpectrumTexture, 0.50);
|
||||
float highs = tex2D(_SpectrumTexture, 0.75);
|
||||
float4 spectrum = float4(sub, bass, mids, highs);
|
||||
|
||||
// screen
|
||||
float2 p = posInput.positionNDC - .5;
|
||||
p.x *= _ScreenParams.x / _ScreenParams.y;
|
||||
|
||||
float t = _Time.y;
|
||||
|
||||
// float3 colour = float3(0.0, 0.0, 0.0);
|
||||
float3 colour = float3(0.0, 0.0, 0.0);
|
||||
float damage = smoothstep(1.5, 3.5, highs);
|
||||
float iterations = 10.0;
|
||||
// float iterations = lerp(10.0, 50.0, highs);
|
||||
float str = 4.5; // lerp(4.9, 5.0, highs);
|
||||
float size = 1.0; //lerp(0.5, 2.0, mids);
|
||||
|
||||
float3 theme = tex2D(_ThemeTexture, length(p)) * _ThemeStrength;
|
||||
|
||||
for(int i=0; i<=iterations; i++) {
|
||||
float3 n = float3(0.,0.,str) + normalize(float3(p, -size))*damage;
|
||||
float rz = map(n, spectrum);
|
||||
float f = clamp((rz - map(n+.1, spectrum)), 0., 1.);
|
||||
float3 l = float3(0.01, 0.01, 0.01) * f + theme * f;
|
||||
colour = colour*l + smoothstep(2.5, .0, rz)*.7*l;
|
||||
damage += min(rz, 1.);
|
||||
}
|
||||
|
||||
return float4(colour, 1.);
|
||||
}
|
||||
|
||||
ENDHLSL
|
||||
|
||||
SubShader
|
||||
{
|
||||
Tags{ "RenderPipeline" = "HDRenderPipeline" }
|
||||
Pass
|
||||
{
|
||||
Name "Custom Pass 0"
|
||||
|
||||
ZWrite Off
|
||||
ZTest Always
|
||||
// Blend SrcAlpha OneMinusSrcAlpha
|
||||
Cull Off
|
||||
|
||||
HLSLPROGRAM
|
||||
#pragma fragment FullScreenPass
|
||||
ENDHLSL
|
||||
}
|
||||
}
|
||||
Fallback Off
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b601654b5e3e3c9499262340b8fa2412
|
||||
ShaderImporter:
|
||||
externalObjects: {}
|
||||
defaultTextures: []
|
||||
nonModifiableTextures: []
|
||||
preprocessorOverride: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,101 @@
|
||||
Shader "FullScreen/Ether"
|
||||
{
|
||||
Properties
|
||||
{
|
||||
_SpectrumTexture("SpectrumTexture", 2D) = "white" {}
|
||||
_ThemeTexture("ThemeTexture", 2D) = "white" {}
|
||||
_SpectrumSize("SpectrumSize", float) = 16
|
||||
}
|
||||
|
||||
HLSLINCLUDE
|
||||
|
||||
// HDRP stuff
|
||||
#pragma vertex Vert
|
||||
#pragma target 4.5
|
||||
#pragma only_renderers d3d11 playstation xboxone xboxseries vulkan metal switch
|
||||
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/CustomPass/CustomPassCommon.hlsl"
|
||||
|
||||
// here we go...
|
||||
sampler2D _SpectrumTexture;
|
||||
sampler2D _ThemeTexture;
|
||||
|
||||
// matrix fn
|
||||
float2x2 m(float a) {
|
||||
float c=cos(a), s=sin(a);
|
||||
float2x2 mat = { c, -s, s, c };
|
||||
return mat;
|
||||
}
|
||||
|
||||
float map(float3 p, float4 spectrum) {
|
||||
float t = _Time.y * 0.5;
|
||||
float magic = spectrum.y * 0.05;
|
||||
float zing = spectrum.x * 0.05;
|
||||
float zip = spectrum.z * 0.05;
|
||||
float wow = 4.5; //lerp(4.0, 5.0, spectrum.w);
|
||||
|
||||
p.xz = mul(m(zing + t), p.xz);
|
||||
p.xy = mul(m(magic + t), p.xy);
|
||||
float3 q = p*wow + t;
|
||||
return length(p +
|
||||
// float3(sin(t - magic), sin(t + magic), sin(t - magic)))
|
||||
float3(magic, zing, zip))
|
||||
*log(length(p)+zip) + sin(q.x+sin(q.z+sin(q.y)))*0.5;
|
||||
}
|
||||
|
||||
float4 FullScreenPass(Varyings varyings) : SV_Target {
|
||||
float depth = LoadCameraDepth(varyings.positionCS.xy);
|
||||
PositionInputs posInput = GetPositionInput(varyings.positionCS.xy, _ScreenSize.zw, depth, UNITY_MATRIX_I_VP, UNITY_MATRIX_V);
|
||||
|
||||
// musique
|
||||
float sub = tex2D(_SpectrumTexture, 0.0);
|
||||
float bass = tex2D(_SpectrumTexture, 0.25);
|
||||
float mids = tex2D(_SpectrumTexture, 0.50);
|
||||
float highs = tex2D(_SpectrumTexture, 0.75);
|
||||
float4 spectrum = float4(sub, bass, mids, highs);
|
||||
|
||||
// screen
|
||||
float2 p = posInput.positionNDC - .5;
|
||||
p.x *= _ScreenParams.x / _ScreenParams.y;
|
||||
|
||||
float t = _Time.y;
|
||||
|
||||
float3 colour = float3(0.0, 0.0, 0.0);
|
||||
float d = smoothstep(1.5, 3.5, sub);
|
||||
float iterations = 10.0;
|
||||
// float iterations = lerp(10.0, 50.0, highs);
|
||||
float str = 4.5; // lerp(4.9, 5.0, highs);
|
||||
float size = 1.0; //lerp(0.5, 2.0, mids);
|
||||
|
||||
for(int i=0; i<=iterations; i++) {
|
||||
float3 n = float3(0.,0.,str) + normalize(float3(p, -size))*d;
|
||||
float rz = map(n, spectrum);
|
||||
float f = clamp((rz - map(n+.1, spectrum))*0.5, -.1, 1.);
|
||||
float3 l = float3(0.1,0.3,.4) + float3(5., 2.5, 3.)*f;
|
||||
colour = colour*l + smoothstep(2.5, .0, rz)*.7*l;
|
||||
d += min(rz, 1.);
|
||||
}
|
||||
|
||||
return float4(colour, 1.);
|
||||
}
|
||||
|
||||
ENDHLSL
|
||||
|
||||
SubShader
|
||||
{
|
||||
Tags{ "RenderPipeline" = "HDRenderPipeline" }
|
||||
Pass
|
||||
{
|
||||
Name "Custom Pass 0"
|
||||
|
||||
ZWrite Off
|
||||
ZTest Always
|
||||
// Blend SrcAlpha OneMinusSrcAlpha
|
||||
Cull Off
|
||||
|
||||
HLSLPROGRAM
|
||||
#pragma fragment FullScreenPass
|
||||
ENDHLSL
|
||||
}
|
||||
}
|
||||
Fallback Off
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 772e6cafbf6db8547ae982f34ac618f4
|
||||
ShaderImporter:
|
||||
externalObjects: {}
|
||||
defaultTextures: []
|
||||
nonModifiableTextures: []
|
||||
preprocessorOverride: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,272 @@
|
||||
%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: Pulsar
|
||||
m_Shader: {fileID: 4800000, guid: c68eae65ade06614693a412d081f2594, type: 3}
|
||||
m_ShaderKeywords: _DISABLE_SSR_TRANSPARENT _NORMALMAP_TANGENT_SPACE
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses:
|
||||
- TransparentDepthPrepass
|
||||
- TransparentDepthPostpass
|
||||
- TransparentBackface
|
||||
- RayTracingPrepass
|
||||
- MOTIONVECTORS
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _AnisotropyMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _BaseColorMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _BentNormalMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _BentNormalMapOS:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _CoatMaskMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _EmissiveColorMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _HeightMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _IridescenceMaskMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _IridescenceThicknessMap:
|
||||
m_Texture: {fileID: 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}
|
||||
- _MaskMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _NormalMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _NormalMapOS:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _SpectrumTexture:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _SpecularColorMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _SubsurfaceMaskMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _TangentMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _TangentMapOS:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _ThemeTexture:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _ThicknessMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _TransmittanceColorMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_Lightmaps:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_LightmapsInd:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_ShadowMasks:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _AORemapMax: 1
|
||||
- _AORemapMin: 0
|
||||
- _ATDistance: 1
|
||||
- _AddPrecomputedVelocity: 0
|
||||
- _AlbedoAffectEmissive: 0
|
||||
- _AlphaCutoff: 0.5
|
||||
- _AlphaCutoffEnable: 0
|
||||
- _AlphaCutoffPostpass: 0.5
|
||||
- _AlphaCutoffPrepass: 0.5
|
||||
- _AlphaCutoffShadow: 0.5
|
||||
- _AlphaDstBlend: 0
|
||||
- _AlphaSrcBlend: 1
|
||||
- _AlphaToMask: 0
|
||||
- _AlphaToMaskInspectorValue: 0
|
||||
- _Anisotropy: 0
|
||||
- _BlendMode: 0
|
||||
- _CoatMask: 0
|
||||
- _CullMode: 2
|
||||
- _CullModeForward: 2
|
||||
- _Cutoff: 0.5
|
||||
- _DepthOffsetEnable: 0
|
||||
- _DetailAlbedoScale: 1
|
||||
- _DetailNormalScale: 1
|
||||
- _DetailSmoothnessScale: 1
|
||||
- _DiffusionProfile: 0
|
||||
- _DiffusionProfileHash: 0
|
||||
- _DisplacementLockObjectScale: 1
|
||||
- _DisplacementLockTilingScale: 1
|
||||
- _DisplacementMode: 0
|
||||
- _DoubleSidedEnable: 0
|
||||
- _DoubleSidedGIMode: 0
|
||||
- _DoubleSidedNormalMode: 1
|
||||
- _DstBlend: 0
|
||||
- _EmissiveColorMode: 1
|
||||
- _EmissiveExposureWeight: 1
|
||||
- _EmissiveIntensity: 1
|
||||
- _EmissiveIntensityUnit: 0
|
||||
- _EnableBlendModePreserveSpecularLighting: 1
|
||||
- _EnableFogOnTransparent: 1
|
||||
- _EnableGeometricSpecularAA: 0
|
||||
- _EnergyConservingSpecularColor: 1
|
||||
- _HeightAmplitude: 0.02
|
||||
- _HeightCenter: 0.5
|
||||
- _HeightMapParametrization: 0
|
||||
- _HeightMax: 1
|
||||
- _HeightMin: -1
|
||||
- _HeightOffset: 0
|
||||
- _HeightPoMAmplitude: 2
|
||||
- _HeightTessAmplitude: 2
|
||||
- _HeightTessCenter: 0.5
|
||||
- _InvTilingScale: 1
|
||||
- _Ior: 1.5
|
||||
- _IridescenceMask: 1
|
||||
- _IridescenceThickness: 1
|
||||
- _LinkDetailsWithBase: 1
|
||||
- _MaterialID: 1
|
||||
- _Metallic: 0
|
||||
- _MetallicRemapMax: 1
|
||||
- _MetallicRemapMin: 0
|
||||
- _NormalMapSpace: 0
|
||||
- _NormalScale: 1
|
||||
- _OpaqueCullMode: 2
|
||||
- _PPDLodThreshold: 5
|
||||
- _PPDMaxSamples: 15
|
||||
- _PPDMinSamples: 5
|
||||
- _PPDPrimitiveLength: 1
|
||||
- _PPDPrimitiveWidth: 1
|
||||
- _RayTracing: 0
|
||||
- _ReceivesSSR: 1
|
||||
- _ReceivesSSRTransparent: 0
|
||||
- _RefractionModel: 0
|
||||
- _Smoothness: 0.5
|
||||
- _SmoothnessRemapMax: 1
|
||||
- _SmoothnessRemapMin: 0
|
||||
- _SpectrumSize: 4
|
||||
- _SpecularAAScreenSpaceVariance: 0.1
|
||||
- _SpecularAAThreshold: 0.2
|
||||
- _SpecularOcclusionMode: 1
|
||||
- _SrcBlend: 1
|
||||
- _StencilRef: 0
|
||||
- _StencilRefDepth: 8
|
||||
- _StencilRefGBuffer: 10
|
||||
- _StencilRefMV: 40
|
||||
- _StencilWriteMask: 6
|
||||
- _StencilWriteMaskDepth: 8
|
||||
- _StencilWriteMaskGBuffer: 14
|
||||
- _StencilWriteMaskMV: 40
|
||||
- _SubsurfaceMask: 1
|
||||
- _SupportDecals: 1
|
||||
- _SurfaceType: 0
|
||||
- _TexWorldScale: 1
|
||||
- _TexWorldScaleEmissive: 1
|
||||
- _Thickness: 1
|
||||
- _TransmissionEnable: 1
|
||||
- _TransparentBackfaceEnable: 0
|
||||
- _TransparentCullMode: 2
|
||||
- _TransparentDepthPostpassEnable: 0
|
||||
- _TransparentDepthPrepassEnable: 0
|
||||
- _TransparentSortPriority: 0
|
||||
- _TransparentWritingMotionVec: 0
|
||||
- _TransparentZWrite: 0
|
||||
- _UVBase: 0
|
||||
- _UVDetail: 0
|
||||
- _UVEmissive: 0
|
||||
- _UseEmissiveIntensity: 0
|
||||
- _UseShadowThreshold: 0
|
||||
- _ZTestDepthEqualForOpaque: 3
|
||||
- _ZTestGBuffer: 4
|
||||
- _ZTestTransparent: 4
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _BaseColorMap_MipInfo: {r: 0, g: 0, b: 0, a: 0}
|
||||
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _DiffusionProfileAsset: {r: 0, g: 0, b: 0, a: 0}
|
||||
- _DoubleSidedConstants: {r: 1, g: 1, b: -1, a: 0}
|
||||
- _EmissionColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _EmissiveColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _EmissiveColorLDR: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _InvPrimScale: {r: 1, g: 1, b: 0, a: 0}
|
||||
- _IridescenceThicknessRemap: {r: 0, g: 1, b: 0, a: 0}
|
||||
- _SpecularColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _ThicknessRemap: {r: 0, g: 1, b: 0, a: 0}
|
||||
- _TransmittanceColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _UVDetailsMappingMask: {r: 1, g: 0, b: 0, a: 0}
|
||||
- _UVMappingMask: {r: 1, g: 0, b: 0, a: 0}
|
||||
- _UVMappingMaskEmissive: {r: 1, g: 0, b: 0, a: 0}
|
||||
m_BuildTextureStacks: []
|
||||
--- !u!114 &7427120379286931205
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 11
|
||||
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: da692e001514ec24dbc4cca1949ff7e8, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
version: 12
|
||||
hdPluginSubTargetMaterialVersions:
|
||||
m_Keys: []
|
||||
m_Values:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ce21ac6719e47134caff55bb77ca6e91
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,148 @@
|
||||
|
||||
Shader "Kaiju/Bubbles"
|
||||
{
|
||||
Properties
|
||||
{
|
||||
_SpectrumTexture("SpectrumTexture", 2D) = "white" {}
|
||||
_ThemeTexture("ThemeTexture", 2D) = "white" {}
|
||||
_SpectrumSize("SpectrumSize", float) = 16
|
||||
|
||||
}
|
||||
|
||||
HLSLINCLUDE
|
||||
|
||||
#pragma vertex Vert
|
||||
|
||||
#pragma target 4.5
|
||||
#pragma only_renderers d3d11 playstation xboxone xboxseries vulkan metal switch
|
||||
|
||||
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/CustomPass/CustomPassCommon.hlsl"
|
||||
|
||||
// The PositionInputs struct allow you to retrieve a lot of useful information for your fullScreenShader:
|
||||
// struct PositionInputs
|
||||
// {
|
||||
// float3 positionWS; // World space position (could be camera-relative)
|
||||
// float2 positionNDC; // Normalized screen coordinates within the viewport : [0, 1) (with the half-pixel offset)
|
||||
// uint2 positionSS; // Screen space pixel coordinates : [0, NumPixels)
|
||||
// uint2 tileCoord; // Screen tile coordinates : [0, NumTiles)
|
||||
// float deviceDepth; // Depth from the depth buffer : [0, 1] (typically reversed)
|
||||
// float linearDepth; // View space Z coordinate : [Near, Far]
|
||||
// };
|
||||
|
||||
// To sample custom buffers, you have access to these functions:
|
||||
// But be careful, on most platforms you can't sample to the bound color buffer. It means that you
|
||||
// can't use the SampleCustomColor when the pass color buffer is set to custom (and same for camera the buffer).
|
||||
// float4 SampleCustomColor(float2 uv);
|
||||
// float4 LoadCustomColor(uint2 pixelCoords);
|
||||
// float LoadCustomDepth(uint2 pixelCoords);
|
||||
// float SampleCustomDepth(float2 uv);
|
||||
|
||||
// There are also a lot of utility function you can use inside Common.hlsl and Color.hlsl,
|
||||
// you can check them out in the source code of the core SRP package.
|
||||
|
||||
sampler2D _SpectrumTexture;
|
||||
sampler2D _ThemeTexture;
|
||||
|
||||
float3 pulsar(in float3 p, in float2 uv, float4 spectrum) {
|
||||
float accum = 0.2;
|
||||
float prev = 0;
|
||||
float tw = 1.0;
|
||||
|
||||
float str = lerp(24.0, 26.0, spectrum.x);
|
||||
|
||||
for (int i = 0; i < 18; ++i) {
|
||||
float mag = dot(p, p);
|
||||
// p = abs(p) / mag + float3(-.5, -.42 - cos(_Time.y*0.2)*0.02, -1.75 + sin(_Time.y*0.2)*0.003);
|
||||
|
||||
float gangsta = -0.41;
|
||||
float tripp = -1.75;
|
||||
float yee = 0.004;
|
||||
float yuh = 0.02;
|
||||
|
||||
// float gangsta = lerp(-0.42, -0.42, spectrum.z);
|
||||
// float yee = lerp(0.005, 0.006, spectrum.y);
|
||||
// float yuh = lerp(0.1, 0.1, spectrum.x);
|
||||
|
||||
p = abs(p) / mag + float3(-.5, gangsta - cos(_Time.y*0.2)* yuh, tripp + sin(_Time.y*0.2)* yee);
|
||||
|
||||
float w = exp(-float(i) / str);
|
||||
accum += w * exp(-str * pow(abs(mag - prev), 2.2));
|
||||
tw += w;
|
||||
prev = mag;
|
||||
}
|
||||
|
||||
float t = clamp(5.0 * accum / tw - 0.9, 0.0, 1.0);
|
||||
return float3(1.3*t*t*t*(1.0 - length(uv)*0.2) , 1.2*t*t, 1.0*t);
|
||||
}
|
||||
|
||||
const float PHI = 1.61803398874989484820459; // Φ = Golden Ratio
|
||||
float gold_noise(in float2 xy, in float seed) {
|
||||
return frac(tan(distance(xy*PHI, xy)*seed)*xy.x);
|
||||
}
|
||||
|
||||
float4 FullScreenPass(Varyings varyings) : SV_Target {
|
||||
UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(varyings);
|
||||
float depth = LoadCameraDepth(varyings.positionCS.xy);
|
||||
PositionInputs posInput = GetPositionInput(varyings.positionCS.xy, _ScreenSize.zw, depth, UNITY_MATRIX_I_VP, UNITY_MATRIX_V);
|
||||
float3 viewDirection = GetWorldSpaceNormalizeViewDir(posInput.positionWS);
|
||||
float4 color = float4(0.0, 0.0, 0.0, 0.0);
|
||||
|
||||
// Load the camera color buffer at the mip 0 if we're not at the before rendering injection point
|
||||
if (_CustomPassInjectionPoint != CUSTOMPASSINJECTIONPOINT_BEFORE_RENDERING)
|
||||
color = float4(CustomPassLoadCameraColor(varyings.positionCS.xy, 0), 1);
|
||||
|
||||
|
||||
// get uv
|
||||
float2 uv = posInput.positionNDC - 0.5;
|
||||
// fix aspect ratio
|
||||
// uv.x *= _ScreenParams.x / _ScreenParams.y;
|
||||
|
||||
float4 output = float4(0.0, 0.0, 0.0, 0.0);
|
||||
float3 p = float3(uv * (_ScreenParams.xy / _ScreenParams.x) / 0.2, 0.0);
|
||||
float seed = 1239959818;
|
||||
|
||||
// cool modulation
|
||||
float time = _Time.y;
|
||||
float sub = tex2D(_SpectrumTexture, 0.0);
|
||||
float bass = tex2D(_SpectrumTexture, 0.25);
|
||||
float mids = tex2D(_SpectrumTexture, 0.50);
|
||||
float highs = tex2D(_SpectrumTexture, 0.75);
|
||||
|
||||
float4 spectrum = float4(sub, bass, mids, highs) * 2;
|
||||
float dir = ceil(sin(_Time.y));
|
||||
|
||||
// output = float4(
|
||||
// pulsar(p * lerp(0.97, 0.99, spectrum.y), uv, spectrum).r,
|
||||
// pulsar(p * lerp(0.97, 0.99, spectrum.y), uv, spectrum).gb,
|
||||
// 1.0
|
||||
// );
|
||||
|
||||
output = float4(
|
||||
pulsar(p, uv, spectrum),
|
||||
1.0
|
||||
);
|
||||
|
||||
return output;
|
||||
}
|
||||
|
||||
ENDHLSL
|
||||
|
||||
SubShader
|
||||
{
|
||||
Tags{ "RenderPipeline" = "HDRenderPipeline" }
|
||||
Pass
|
||||
{
|
||||
Name "Custom Pass 0"
|
||||
|
||||
ZWrite Off
|
||||
ZTest Always
|
||||
Blend SrcAlpha OneMinusSrcAlpha
|
||||
Cull Off
|
||||
|
||||
HLSLPROGRAM
|
||||
#pragma fragment FullScreenPass
|
||||
ENDHLSL
|
||||
}
|
||||
}
|
||||
Fallback Off
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c68eae65ade06614693a412d081f2594
|
||||
ShaderImporter:
|
||||
externalObjects: {}
|
||||
defaultTextures: []
|
||||
nonModifiableTextures: []
|
||||
preprocessorOverride: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in new issue
Block a user