* Remove HDRP_Tests from .repoconfig

* Apply auto fixes

* Add name exception for TestProjects
This commit is contained in:
Théo Penavaire 2021-07-08 15:16:28 +02:00 коммит произвёл GitHub
Родитель 56d035390f
Коммит 457cf2e7a4
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
39 изменённых файлов: 280 добавлений и 287 удалений

Просмотреть файл

@ -23,7 +23,6 @@ path-ignore=<<EOT
|TestProjects\/HDRP_HybridTests # So remove the test projects one by one as they are progressively being reformatted
|TestProjects\/HDRP_PerformanceTests # New test projects folder will automatically be included in the formatting checks since they aren't in that list
|TestProjects\/HDRP_RuntimeTests
|TestProjects\/HDRP_Tests
|TestProjects\/Shadergraph
|TestProjects\/ShadergraphUniversalStereo
|TestProjects\/SRP_SmokeTest
@ -48,4 +47,5 @@ path=<<EOT
|^com\.unity\.[^\/]*\/\w+~\/[^&]+$ # allows editor excluded folders, like Documentation~, for core package
|^com\.unity\.[^\/]*\/Packages\/com\.unity\.[^\/]*\/\w+~\/ # as above but for embedded packages
|^com\.unity\.[^\/]*\/[^@]+@\d+x\. # industry standard for icons with differnet resolution
|^TestProjects\/ # allow all names for test files
EOT

Просмотреть файл

@ -49,17 +49,17 @@ public class DocChecker : EditorWindow
public string undocumentedEntitiesFilePath => outputFolder + "/" + "undocumented_entities.txt";
[MenuItem ("Window/Doc Checker")]
[MenuItem("Window/Doc Checker")]
public new static void Show() => EditorWindow.GetWindow<DocChecker>();
void OnGUI ()
void OnGUI()
{
UpdatePackagesList();
if (IsLoading())
{
EditorGUILayout.LabelField("Loading Packages ...");
return ;
return;
}
if (collection == null)
@ -207,7 +207,7 @@ public class DocChecker : EditorWindow
if (responseFilePath != null)
File.Delete(responseFilePath);
EditorUtility.ClearProgressBar();
Debug.Log("Done !");
}

Просмотреть файл

@ -64,4 +64,4 @@ class ProcessOutputStreamReader
return lines.ToArray();
}
}
}
}

Просмотреть файл

@ -7,4 +7,4 @@
* One shader graph fabric with transmission referencing a diffusion profile saved inside the shader graph diffusion profile slot
* One shader graph stacklit with transmission referencing a diffusion profile saved inside a shader graph diffusion profile node
* One shader graph lit with a checkerboard pattern to choose the diffusion profile referencing diffusion profile saved inside two nodes.
* One lit shader without diffusion profile but transmission enabled (it uses the default diffusion profile)
* One lit shader without diffusion profile but transmission enabled (it uses the default diffusion profile)

Просмотреть файл

@ -9,7 +9,7 @@ public class ReflectionProbeToTexture : MonoBehaviour
[SerializeField] private ReflectionProbe targetProbe = null;
[SerializeField] private bool correctGamma = false;
[SerializeField] private bool boxLayout = false;
private Material blitMat;
private Texture probeTexture;
private Texture2D texture;
@ -22,7 +22,7 @@ public class ReflectionProbeToTexture : MonoBehaviour
}
[ContextMenu("Refresh")]
public void Convert ()
public void Convert()
{
if (targetProbe != null)
{
@ -37,7 +37,7 @@ public class ReflectionProbeToTexture : MonoBehaviour
RenderTexture dest = new RenderTexture(texture.width, texture.height, 0, RenderTextureFormat.ARGB32, RenderTextureReadWrite.Default);
while (!targetProbe.IsFinishedRendering(renderID)) { };
while (!targetProbe.IsFinishedRendering(renderID)) {};
probeTexture = targetProbe.texture;
@ -52,7 +52,7 @@ public class ReflectionProbeToTexture : MonoBehaviour
GetComponent<RawImage>().texture = texture;
}
}
}
[ContextMenu("RenderProbe")]
public void RenderProbe()

Просмотреть файл

@ -1,50 +1,50 @@
Shader "Hiddent/HDRP/Tests/TexCubeToTex2D"
{
Properties
{
_MainTex ("Texture", Cube) = "white" {}
Properties
{
_MainTex ("Texture", Cube) = "white" {}
_CorrectGamma ("Correct Gamma", float ) = 0
_BoxLayout ("Box Layout", float) = 0
}
SubShader
{
Tags { "RenderType"="Opaque" }
LOD 100
}
SubShader
{
Tags { "RenderType"="Opaque" }
LOD 100
Pass
{
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#include "UnityCG.cginc"
Pass
{
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
struct appdata
{
float4 vertex : POSITION;
float2 uv : TEXCOORD0;
};
#include "UnityCG.cginc"
struct v2f
{
float2 uv : TEXCOORD0;
float4 vertex : SV_POSITION;
};
struct appdata
{
float4 vertex : POSITION;
float2 uv : TEXCOORD0;
};
struct v2f
{
float2 uv : TEXCOORD0;
float4 vertex : SV_POSITION;
};
samplerCUBE _MainTex;
bool _CorrectGamma;
float _BoxLayout;
v2f vert (appdata v)
{
v2f o;
o.vertex = UnityObjectToClipPos(v.vertex);
v2f vert (appdata v)
{
v2f o;
o.vertex = UnityObjectToClipPos(v.vertex);
o.uv = v.uv;
return o;
}
fixed4 frag (v2f i) : SV_Target
{
return o;
}
fixed4 frag (v2f i) : SV_Target
{
float3 coords = float3(0,0,0);
coords.x = cos( i.uv.x * UNITY_PI * 2 );
@ -121,14 +121,14 @@ Shader "Hiddent/HDRP/Tests/TexCubeToTex2D"
coords = normalize(coords);
}
col.rgb *= texCUBElod(_MainTex, float4(coords, 0)).rgb;
col.rgb *= texCUBElod(_MainTex, float4(coords, 0)).rgb;
if (_CorrectGamma == 1)
col.rgb = pow(col.rgb, 0.4545454545); // Gamma Correction
return col;
}
ENDCG
}
}
}
ENDCG
}
}
}

Просмотреть файл

@ -5,27 +5,27 @@ using UnityEngine;
[ExecuteInEditMode]
public class CookieUpdater : MonoBehaviour
{
[SerializeField] Material crtMaterial = null;
[SerializeField] Material crtMaterial = null;
[SerializeField] CustomRenderTexture[] customRenderTextures = null;
[SerializeField] CustomRenderTexture[] customRenderTextures = null;
int frames = 0;
int frames = 0;
void Start()
{
frames = 0;
}
void Start()
{
frames = 0;
}
void Update()
{
if (crtMaterial != null)
crtMaterial.SetFloat("_MyTime", frames / 60f);
void Update()
{
if (crtMaterial != null)
crtMaterial.SetFloat("_MyTime", frames / 60f);
if (customRenderTextures != null)
foreach(CustomRenderTexture crt in customRenderTextures)
if (crt != null)
crt.Update();
if (customRenderTextures != null)
foreach (CustomRenderTexture crt in customRenderTextures)
if (crt != null)
crt.Update();
++frames;
}
++frames;
}
}

Просмотреть файл

@ -1,104 +1,104 @@
using System.Collections;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
[RequireComponent(typeof(MeshFilter))]
public class BuildSphereSection : MonoBehaviour
{
public float radius = 1f;
public float angle = 60f;
public int segmentsX = 32;
public int segmentsY = 5;
public float radius = 1f;
public float angle = 60f;
public int segmentsX = 32;
public int segmentsY = 5;
public Mesh mesh;
public Mesh mesh;
void OnValidate()
{
MeshFilter meshFilter = GetComponent<MeshFilter>();
void OnValidate()
{
MeshFilter meshFilter = GetComponent<MeshFilter>();
if ( segmentsX < 3 ) segmentsX = 3;
if ( segmentsY < 1 ) segmentsY = 1;
angle = Mathf.Clamp(angle, 1f, 179f);
if (segmentsX < 3) segmentsX = 3;
if (segmentsY < 1) segmentsY = 1;
angle = Mathf.Clamp(angle, 1f, 179f);
int vertexcount = segmentsX * segmentsY + 1;
int vertexcount = segmentsX * segmentsY + 1;
Vector3[] vertices = new Vector3[ vertexcount ];
List<int> triangles = new List<int>();
Vector2[] uvs = new Vector2[ vertexcount ];
Vector3[] normals = new Vector3[vertexcount];
Vector3[] vertices = new Vector3[vertexcount];
List<int> triangles = new List<int>();
Vector2[] uvs = new Vector2[vertexcount];
Vector3[] normals = new Vector3[vertexcount];
float halfAngleRad = Mathf.Deg2Rad * angle * 0.5f;
float halfAngleRad = Mathf.Deg2Rad * angle * 0.5f;
float sphereRadius = radius / Mathf.Sin( halfAngleRad );
float sphereRadius = radius / Mathf.Sin(halfAngleRad);
int index;
int[] quadIndices = new int[4];
float angleA;
float angleB;
Quaternion rot;
int index;
int[] quadIndices = new int[4];
float angleA;
float angleB;
Quaternion rot;
Vector3 offset = - Vector3.forward * sphereRadius;
Vector3 offset = -Vector3.forward * sphereRadius;
for (int y=0 ; y<segmentsY ; ++y)
{
angleB = angle * 0.5f * (1f - 1f * y / segmentsY );
for (int x=0 ; x < segmentsX ; ++x)
{
angleA = 360f * x / segmentsX;
for (int y = 0; y < segmentsY; ++y)
{
angleB = angle * 0.5f * (1f - 1f * y / segmentsY);
for (int x = 0; x < segmentsX; ++x)
{
angleA = 360f * x / segmentsX;
index = x + y * segmentsX;
index = x + y * segmentsX;
//Debug.Log("x:"+x+", y:"+y+", angleA:"+(angleA*Mathf.Rad2Deg)+", angleB:"+(angleB*Mathf.Rad2Deg));
rot = Quaternion.Euler(0f, 0f, angleA) * Quaternion.Euler(angleB, 0f, 0f);
//Debug.Log("x:"+x+", y:"+y+", angleA:"+(angleA*Mathf.Rad2Deg)+", angleB:"+(angleB*Mathf.Rad2Deg));
rot = Quaternion.Euler(0f, 0f, angleA) * Quaternion.Euler(angleB, 0f, 0f);
vertices[index] = rot * Vector3.forward * sphereRadius + offset;
vertices[index] = rot * Vector3.forward * sphereRadius + offset;
//Debug.DrawLine( vertices[index] + transform.position, transform.position, Color.cyan, 1f );
//Debug.DrawLine( vertices[index] + transform.position, transform.position, Color.cyan, 1f );
normals[index] = (offset - vertices[index]).normalized;
uvs[index] = ( Vector2.one + new Vector2( Mathf.Cos(angleA), Mathf.Sin(angleA)) * y / segmentsY ) * 0.5f ;
normals[index] = (offset - vertices[index]).normalized;
uvs[index] = (Vector2.one + new Vector2(Mathf.Cos(angleA), Mathf.Sin(angleA)) * y / segmentsY) * 0.5f;
if (y < (segmentsY-1))
{
quadIndices[0] = index;
quadIndices[1] = (x==(segmentsX-1))? y*segmentsX : index+1;
quadIndices[3] = index + segmentsX;
quadIndices[2] = (x==(segmentsX-1))? (y+1)*segmentsX : quadIndices[3]+1;
if (y < (segmentsY - 1))
{
quadIndices[0] = index;
quadIndices[1] = (x == (segmentsX - 1)) ? y * segmentsX : index + 1;
quadIndices[3] = index + segmentsX;
quadIndices[2] = (x == (segmentsX - 1)) ? (y + 1) * segmentsX : quadIndices[3] + 1;
triangles.Add(quadIndices[0]);
triangles.Add(quadIndices[2]);
triangles.Add(quadIndices[1]);
triangles.Add(quadIndices[0]);
triangles.Add(quadIndices[2]);
triangles.Add(quadIndices[1]);
triangles.Add(quadIndices[0]);
triangles.Add(quadIndices[3]);
triangles.Add(quadIndices[2]);
}
else
{
quadIndices[0] = index;
quadIndices[1] = (x==(segmentsX-1))? y*segmentsX : index+1;
quadIndices[2] = vertexcount-1;
triangles.Add(quadIndices[0]);
triangles.Add(quadIndices[3]);
triangles.Add(quadIndices[2]);
}
else
{
quadIndices[0] = index;
quadIndices[1] = (x == (segmentsX - 1)) ? y * segmentsX : index + 1;
quadIndices[2] = vertexcount - 1;
triangles.Add(quadIndices[0]);
triangles.Add(quadIndices[2]);
triangles.Add(quadIndices[1]);
}
}
}
triangles.Add(quadIndices[0]);
triangles.Add(quadIndices[2]);
triangles.Add(quadIndices[1]);
}
}
}
vertices[vertexcount-1] = Vector3.forward * sphereRadius + offset;
normals[vertexcount-1] = (offset - vertices[vertexcount-1]).normalized;
uvs[vertexcount-1] = Vector2.one * 0.5f;
vertices[vertexcount - 1] = Vector3.forward * sphereRadius + offset;
normals[vertexcount - 1] = (offset - vertices[vertexcount - 1]).normalized;
uvs[vertexcount - 1] = Vector2.one * 0.5f;
if (mesh == null) mesh = new Mesh();
mesh.name = "Sphere Section";
mesh.Clear();
mesh.vertices = vertices;
mesh.triangles = triangles.ToArray();
mesh.normals = normals;
mesh.uv = uvs;
mesh.RecalculateBounds();
if (mesh == null) mesh = new Mesh();
mesh.name = "Sphere Section";
mesh.Clear();
mesh.vertices = vertices;
mesh.triangles = triangles.ToArray();
mesh.normals = normals;
mesh.uv = uvs;
mesh.RecalculateBounds();
meshFilter.mesh = mesh;
}
meshFilter.mesh = mesh;
}
}

Просмотреть файл

@ -1,4 +1,4 @@
using System.Collections;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Rendering.HighDefinition;
@ -6,43 +6,43 @@ using UnityEngine.Rendering.HighDefinition;
[RequireComponent(typeof(Light))]
public class SpotAngleDistance : MonoBehaviour
{
public float targetRadius = 1f;
public float referenceIntensity = 600f;
public float referenceDistance = 1.5f;
public float additionalRange = 10f;
public float targetRadius = 1f;
public float referenceIntensity = 600f;
public float referenceDistance = 1.5f;
public float additionalRange = 10f;
public enum Mode {Distance, Angle}
public Mode mode = Mode.Distance;
public float distance = 3f;
public float angle = 60f;
public enum Mode { Distance, Angle }
public Mode mode = Mode.Distance;
public float distance = 3f;
public float angle = 60f;
[SerializeField, HideInInspector] private Light targetLight;
[SerializeField, HideInInspector] private HDAdditionalLightData hdLightData;
[SerializeField, HideInInspector] private Light targetLight;
[SerializeField, HideInInspector] private HDAdditionalLightData hdLightData;
void OnValidate()
{
if (targetLight == null) targetLight = GetComponent<Light>();
if (targetLight == null) return;
if (hdLightData == null) hdLightData = GetComponent<HDAdditionalLightData>();
if (hdLightData == null) return;
void OnValidate()
{
if (targetLight == null) targetLight = GetComponent<Light>();
if (targetLight == null) return;
if (hdLightData == null) hdLightData = GetComponent<HDAdditionalLightData>();
if (hdLightData == null) return;
if ( mode == Mode.Distance)
{
float t = targetRadius / distance;
angle = Mathf.Atan(t) * Mathf.Rad2Deg * 2f;
}
else
{
float t = Mathf.Tan(Mathf.Deg2Rad * angle * 0.5f);
distance = targetRadius / t;
}
if (mode == Mode.Distance)
{
float t = targetRadius / distance;
angle = Mathf.Atan(t) * Mathf.Rad2Deg * 2f;
}
else
{
float t = Mathf.Tan(Mathf.Deg2Rad * angle * 0.5f);
distance = targetRadius / t;
}
float sphereRadius = targetRadius / Mathf.Sin( Mathf.Deg2Rad * angle * 0.5f );
float sphereRadius = targetRadius / Mathf.Sin(Mathf.Deg2Rad * angle * 0.5f);
targetLight.spotAngle = angle;
targetLight.range = sphereRadius + additionalRange;
transform.localPosition = -sphereRadius * Vector3.forward;
targetLight.spotAngle = angle;
targetLight.range = sphereRadius + additionalRange;
transform.localPosition = -sphereRadius * Vector3.forward;
hdLightData.intensity = referenceIntensity * Mathf.Pow( sphereRadius / referenceDistance , 2f );
}
hdLightData.intensity = referenceIntensity * Mathf.Pow(sphereRadius / referenceDistance , 2f);
}
}

Просмотреть файл

@ -174,9 +174,9 @@ Shader "Custom/StencilShowShader"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Material.hlsl"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Unlit/Unlit.hlsl"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Unlit/ShaderPass/UnlitDepthPass.hlsl"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Unlit/UnlitData.hlsl"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassDepthOnly.hlsl"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Unlit/ShaderPass/UnlitDepthPass.hlsl"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Unlit/UnlitData.hlsl"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassDepthOnly.hlsl"
#pragma vertex Vert
#pragma fragment Frag
@ -212,8 +212,8 @@ Shader "Custom/StencilShowShader"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Material.hlsl"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Unlit/Unlit.hlsl"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Unlit/ShaderPass/UnlitSharePass.hlsl"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Unlit/UnlitData.hlsl"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassMotionVectors.hlsl"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Unlit/UnlitData.hlsl"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassMotionVectors.hlsl"
#pragma vertex Vert
#pragma fragment Frag
@ -251,8 +251,8 @@ Shader "Custom/StencilShowShader"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Material.hlsl"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Unlit/Unlit.hlsl"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Unlit/ShaderPass/UnlitSharePass.hlsl"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Unlit/UnlitData.hlsl"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassForwardUnlit.hlsl"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Unlit/UnlitData.hlsl"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassForwardUnlit.hlsl"
#pragma vertex Vert
#pragma fragment Frag
@ -280,8 +280,8 @@ Shader "Custom/StencilShowShader"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Material.hlsl"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Unlit/Unlit.hlsl"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Unlit/ShaderPass/UnlitSharePass.hlsl"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Unlit/UnlitData.hlsl"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassLightTransport.hlsl"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Unlit/UnlitData.hlsl"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassLightTransport.hlsl"
#pragma vertex Vert
#pragma fragment Frag
@ -307,8 +307,8 @@ Shader "Custom/StencilShowShader"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Material.hlsl"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Unlit/Unlit.hlsl"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Unlit/ShaderPass/UnlitDistortionPass.hlsl"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Unlit/UnlitData.hlsl"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassDistortion.hlsl"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Unlit/UnlitData.hlsl"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassDistortion.hlsl"
#pragma vertex Vert
#pragma fragment Frag

Просмотреть файл

@ -174,9 +174,9 @@ Shader "Custom/StencilWriteShader"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Material.hlsl"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Unlit/Unlit.hlsl"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Unlit/ShaderPass/UnlitDepthPass.hlsl"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Unlit/UnlitData.hlsl"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassDepthOnly.hlsl"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Unlit/ShaderPass/UnlitDepthPass.hlsl"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Unlit/UnlitData.hlsl"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassDepthOnly.hlsl"
#pragma vertex Vert
#pragma fragment Frag
@ -212,8 +212,8 @@ Shader "Custom/StencilWriteShader"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Material.hlsl"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Unlit/Unlit.hlsl"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Unlit/ShaderPass/UnlitSharePass.hlsl"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Unlit/UnlitData.hlsl"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassMotionVectors.hlsl"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Unlit/UnlitData.hlsl"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassMotionVectors.hlsl"
#pragma vertex Vert
#pragma fragment Frag
@ -251,8 +251,8 @@ Shader "Custom/StencilWriteShader"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Material.hlsl"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Unlit/Unlit.hlsl"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Unlit/ShaderPass/UnlitSharePass.hlsl"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Unlit/UnlitData.hlsl"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassForwardUnlit.hlsl"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Unlit/UnlitData.hlsl"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassForwardUnlit.hlsl"
#pragma vertex Vert
#pragma fragment Frag
@ -280,8 +280,8 @@ Shader "Custom/StencilWriteShader"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Material.hlsl"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Unlit/Unlit.hlsl"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Unlit/ShaderPass/UnlitSharePass.hlsl"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Unlit/UnlitData.hlsl"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassLightTransport.hlsl"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Unlit/UnlitData.hlsl"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassLightTransport.hlsl"
#pragma vertex Vert
#pragma fragment Frag
@ -307,8 +307,8 @@ Shader "Custom/StencilWriteShader"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Material.hlsl"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Unlit/Unlit.hlsl"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Unlit/ShaderPass/UnlitDistortionPass.hlsl"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Unlit/UnlitData.hlsl"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassDistortion.hlsl"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Unlit/UnlitData.hlsl"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassDistortion.hlsl"
#pragma vertex Vert
#pragma fragment Frag

Просмотреть файл

@ -23,5 +23,4 @@ public class BakeProbes : MonoBehaviour
}
#endif
}
}

Просмотреть файл

@ -29,12 +29,11 @@ public class AOVLightingMode : MonoBehaviour
return null;
}
AOVRequestDataCollection BuildAovRequest()
{
var aovRequestBuilder = new AOVRequestBuilder();
var aovRequest = new AOVRequest(AOVRequest.NewDefault()).SetFullscreenOutput(LightingProperty.DiffuseOnly);
aovRequestBuilder.Add(aovRequest, RTAllocator, null, new[] { AOVBuffers.Color }, (cmd, textures, properties) => { if (diffuse != null) cmd.Blit(textures[0], diffuse); } );
aovRequestBuilder.Add(aovRequest, RTAllocator, null, new[] { AOVBuffers.Color }, (cmd, textures, properties) => { if (diffuse != null) cmd.Blit(textures[0], diffuse); });
aovRequest.SetFullscreenOutput(LightingProperty.SpecularOnly);
aovRequestBuilder.Add(aovRequest, RTAllocator, null, new[] { AOVBuffers.Color }, (cmd, textures, properties) => { if (specular != null) cmd.Blit(textures[0], specular); });
aovRequest.SetFullscreenOutput(LightingProperty.DirectDiffuseOnly);
@ -58,7 +57,7 @@ public class AOVLightingMode : MonoBehaviour
var add = GetComponent<HDAdditionalCameraData>();
add.SetAOVRequests(null);
}
void OnValidate()
{
OnDisable();

Просмотреть файл

@ -11,7 +11,6 @@ public enum Type
};
public class Motion : MonoBehaviour
{
float angle = 0;
float dist = 0;
float dir = 1.0f;
@ -36,7 +35,7 @@ public class Motion : MonoBehaviour
{
if (type == Type.Circle)
{
if(perFrame)
if (perFrame)
{
float fixedStep = speed / 30.0f;
angle += fixedStep;
@ -69,7 +68,6 @@ public class Motion : MonoBehaviour
Vector3 offset = axisSide.normalized * dist;// new Vector3(dist, 0.0f, 0.0f);
transform.position = originalPos + offset;
}
if (type == Type.Rotate)
{

Просмотреть файл

@ -7,14 +7,13 @@ public class TriggerMotionVecView : MonoBehaviour
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
HDRenderPipeline hdrp = UnityEngine.Rendering.RenderPipelineManager.currentPipeline as HDRenderPipeline;
if(hdrp != null)
if (hdrp != null)
hdrp.debugDisplaySettings.data.fullScreenDebugMode = FullScreenDebugMode.MotionVectors;
}
}

Просмотреть файл

@ -1,4 +1,4 @@
using UnityEngine;
using UnityEngine;
using UnityEngine.Rendering;
using UnityEngine.Rendering.HighDefinition;
using System;

Просмотреть файл

@ -1,4 +1,4 @@
Shader "Hidden/Shader/BluePP"
Shader "Hidden/Shader/BluePP"
{
HLSLINCLUDE

Просмотреть файл

@ -1,4 +1,4 @@
using UnityEngine;
using UnityEngine;
using UnityEngine.Rendering;
using UnityEngine.Rendering.HighDefinition;
using System;

Просмотреть файл

@ -1,4 +1,4 @@
Shader "Hidden/Shader/GreenPP"
Shader "Hidden/Shader/GreenPP"
{
HLSLINCLUDE

Просмотреть файл

@ -1,4 +1,4 @@
using UnityEngine;
using UnityEngine;
using UnityEngine.Rendering;
using UnityEngine.Rendering.HighDefinition;
using System;

Просмотреть файл

@ -1,4 +1,4 @@
Shader "Hidden/Shader/RedPP"
Shader "Hidden/Shader/RedPP"
{
HLSLINCLUDE

Просмотреть файл

@ -4,7 +4,7 @@ using UnityEngine.Rendering;
public class SetCameraDrsFilter : MonoBehaviour
{
public DynamicResUpscaleFilter DrsFilter = DynamicResUpscaleFilter.Bilinear;
private Camera m_Camera = null;
void Start()

Просмотреть файл

@ -97,14 +97,14 @@ public class MultiCam : MonoBehaviour
{
for (var x = 0; x < tiles.x; ++x)
{
if ( i < sets.Length ) sets[i].gameObject.SetActive(true);
if ( i < modifiers.Length ) modifiers[i].Invoke();
if (i < sets.Length) sets[i].gameObject.SetActive(true);
if (i < modifiers.Length) modifiers[i].Invoke();
targetCam.Render();
Graphics.CopyTexture(smallRT, 0, 0, 0, 0, singleRes.x, singleRes.y, rt, 0, 0, x*singleRes.x, (tiles.y-y-1)*singleRes.y);
Graphics.CopyTexture(smallRT, 0, 0, 0, 0, singleRes.x, singleRes.y, rt, 0, 0, x * singleRes.x, (tiles.y - y - 1) * singleRes.y);
if ( i < sets.Length ) sets[i].gameObject.SetActive(false);
if (i < sets.Length) sets[i].gameObject.SetActive(false);
++i;
}
}
@ -116,7 +116,7 @@ public class MultiCam : MonoBehaviour
if (displayObject != null && displayObject.sharedMaterial != null)
{
displayObject.sharedMaterial.SetTexture(displayTextureProperty, rt);
displayObject.transform.localScale = new Vector3( (singleRes.x*tiles.x) * 1f/(singleRes.y*tiles.y) ,1f,1f);
displayObject.transform.localScale = new Vector3((singleRes.x * tiles.x) * 1f / (singleRes.y * tiles.y) , 1f, 1f);
}
}

Просмотреть файл

@ -15,7 +15,7 @@ public class LightScriptCreator : MonoBehaviour
public Material transparentShadowCastingMaterial;
IEnumerable< Vector2Int > GetGridPositions()
IEnumerable<Vector2Int> GetGridPositions()
{
for (int x = 0; x < gridWidth; x++)
for (int y = 0; y < gridHeight; y++)
@ -33,7 +33,7 @@ public class LightScriptCreator : MonoBehaviour
// Position the light in front of the plane
go.transform.localPosition = new Vector3(position.x, position.y, -3);
var hdLight = go.AddHDLight(HDLightTypeAndShape.Point);
// Set global parameters
@ -116,7 +116,7 @@ public class LightScriptCreator : MonoBehaviour
hdLight.EnableShadows(true);
hdLight.SetShadowResolution(Mathf.NextPowerOfTwo(Random.Range(32, 512)));
var occluder = GameObject.CreatePrimitive(PrimitiveType.Quad);
occluder.GetComponent< MeshRenderer >().sharedMaterial = transparentShadowCastingMaterial;
occluder.GetComponent<MeshRenderer>().sharedMaterial = transparentShadowCastingMaterial;
occluder.transform.SetParent(hdLight.transform, false);
occluder.transform.localPosition = new Vector3(0, 0, 0.5f);
occluder.transform.localScale = Vector3.one * 0.4f;

Просмотреть файл

@ -1,4 +1,4 @@
Shader "FullScreen/BeforeOpaqueDepthAndNormal"
Shader "FullScreen/BeforeOpaqueDepthAndNormal"
{
HLSLINCLUDE

Просмотреть файл

@ -1,4 +1,4 @@
using UnityEngine;
using UnityEngine;
using UnityEngine.Rendering.HighDefinition;
using UnityEngine.Rendering;
using UnityEngine.Experimental.Rendering;

Просмотреть файл

@ -1,4 +1,4 @@
Shader "Hidden/Outline"
Shader "Hidden/Outline"
{
HLSLINCLUDE
@ -17,7 +17,7 @@
#define c45 0.707107
#define c225 0.9238795
#define s225 0.3826834
#define MAXSAMPLES 8
// Neighbour pixel positions
static float2 samplingPositions[MAXSAMPLES] =

Просмотреть файл

@ -1,4 +1,4 @@
using UnityEngine;
using UnityEngine;
using UnityEngine.Rendering.HighDefinition;
using UnityEngine.Rendering;
using UnityEngine.Experimental.Rendering;
@ -20,4 +20,4 @@ class WriteNormals : CustomPass
{
// Cleanup code
}
}
}

Просмотреть файл

@ -1,4 +1,4 @@
Shader "Renderers/Renderers_Test"
Shader "Renderers/Renderers_Test"
{
Properties
{
@ -44,7 +44,7 @@
// Toggle fog on transparent
#define _ENABLE_FOG_ON_TRANSPARENT
// List all the attributes needed in your shader (will be passed to the vertex shader)
// you can see the complete list of these attributes in VaryingMesh.hlsl
#define ATTRIBUTES_NEED_TEXCOORD0
@ -54,7 +54,7 @@
// List all the varyings needed in your fragment shader
#define VARYINGS_NEED_TEXCOORD0
#define VARYINGS_NEED_TANGENT_TO_WORLD
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/CustomPass/CustomPassRenderers.hlsl"
TEXTURE2D(_ColorMap);

Просмотреть файл

@ -1,4 +1,4 @@
using UnityEngine;
using UnityEngine;
using UnityEngine.Rendering.HighDefinition;
using UnityEngine.Rendering;
using UnityEngine.Experimental.Rendering;
@ -46,6 +46,6 @@ class Blur : CustomPass
protected override void Cleanup()
{
halfResTarget.Release();
halfResTarget.Release();
}
}
}

Просмотреть файл

@ -1,4 +1,4 @@
using UnityEngine;
using UnityEngine;
using UnityEngine.Rendering.HighDefinition;
using UnityEngine.Rendering;
using UnityEngine.Experimental.Rendering;
@ -69,4 +69,4 @@ class Copy : CustomPass
}
protected override void Cleanup() => halfResTarget.Release();
}
}

Просмотреть файл

@ -1,4 +1,4 @@
using UnityEngine;
using UnityEngine;
using UnityEngine.Rendering.HighDefinition;
using UnityEngine.Rendering;
using UnityEngine.Experimental.Rendering;
@ -62,7 +62,7 @@ class OverrideCamera : CustomPass
depthState = new DepthState(true, CompareFunction.LessEqual)
};
// Render from camera 1
// Render from camera 1
CustomPassUtils.RenderFromCamera(ctx, customCamera1, temp, ctx.customDepthBuffer.Value, ClearFlag.All, -1, overrideRenderState: overrideDepth);
CustomPassUtils.Copy(
ctx, temp, ctx.cameraColorBuffer,
@ -111,4 +111,4 @@ class OverrideCamera : CustomPass
halfResColor.Release();
halfResDepth.Release();
}
}
}

Просмотреть файл

@ -45,7 +45,7 @@ Shader "Renderers/RenderersTemplate"
// Toggle fog on transparent
#define _ENABLE_FOG_ON_TRANSPARENT
// List all the attributes needed in your shader (will be passed to the vertex shader)
// you can see the complete list of these attributes in VaryingMesh.hlsl
#define ATTRIBUTES_NEED_TEXCOORD0
@ -55,7 +55,7 @@ Shader "Renderers/RenderersTemplate"
// List all the varyings needed in your fragment shader
#define VARYINGS_NEED_TEXCOORD0
#define VARYINGS_NEED_TANGENT_TO_WORLD
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/CustomPass/CustomPassRenderers.hlsl"
TEXTURE2D(_ColorMap);

Просмотреть файл

@ -2,23 +2,19 @@ using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class SimulateAndPauseSystem : MonoBehaviour {
public class SimulateAndPauseSystem : MonoBehaviour
{
public float forwardTime = 1.5f;
private ParticleSystem ps;
private void Start()
{
ps = GetComponent<ParticleSystem>();
ps = GetComponent<ParticleSystem>();
if (ps)
{
ps.Simulate(forwardTime);
ps.Pause();
}
if (ps)
{
ps.Simulate(forwardTime);
ps.Pause();
}
}
}

Просмотреть файл

@ -16,45 +16,45 @@ public class AovOutput : MonoBehaviour
Material _material;
MaterialPropertyBlock _props;
(RTHandle output, RTHandle color, RTHandle depth, RTHandle normal, RTHandle motionvector) _rt;
(RTHandle output, RTHandle color, RTHandle depth, RTHandle normal, RTHandle motionvector)_rt;
RTHandle RTAllocator(AOVBuffers bufferID)
{
if (bufferID == AOVBuffers.Output)
return _rt.output ??
(_rt.output = RTHandles.Alloc(
_outputTexture.width, _outputTexture.height, 1,
DepthBits.None, GraphicsFormat.R8G8B8A8_SRGB));
_outputTexture.width, _outputTexture.height, 1,
DepthBits.None, GraphicsFormat.R8G8B8A8_SRGB));
if (bufferID == AOVBuffers.Color)
return _rt.color ??
(_rt.color = RTHandles.Alloc(
_colorTexture.width, _colorTexture.height, 1,
DepthBits.None, GraphicsFormat.R8G8B8A8_SRGB));
_colorTexture.width, _colorTexture.height, 1,
DepthBits.None, GraphicsFormat.R8G8B8A8_SRGB));
if (bufferID == AOVBuffers.DepthStencil)
return _rt.depth ??
(_rt.depth = RTHandles.Alloc(
_depthTexture.width, _depthTexture.height, 1,
DepthBits.None, GraphicsFormat.R8G8B8A8_SRGB));
_depthTexture.width, _depthTexture.height, 1,
DepthBits.None, GraphicsFormat.R8G8B8A8_SRGB));
if (bufferID == AOVBuffers.Normals)
return _rt.normal ??
(_rt.normal = RTHandles.Alloc(
_normalTexture.width, _normalTexture.height, 1,
DepthBits.None, GraphicsFormat.R8G8B8A8_UNorm));
_normalTexture.width, _normalTexture.height, 1,
DepthBits.None, GraphicsFormat.R8G8B8A8_UNorm));
return _rt.motionvector ??
(_rt.motionvector = RTHandles.Alloc(
_motionVectorsTexture.width, _motionVectorsTexture.height, 1,
DepthBits.None, GraphicsFormat.R8G8B8A8_SRGB));
_motionVectorsTexture.width, _motionVectorsTexture.height, 1,
DepthBits.None, GraphicsFormat.R8G8B8A8_SRGB));
}
void AovCallback(
CommandBuffer cmd,
List<RTHandle> buffers,
RenderOutputProperties outProps
CommandBuffer cmd,
List<RTHandle> buffers,
RenderOutputProperties outProps
)
{
// Shader objects instantiation
@ -106,15 +106,16 @@ public class AovOutput : MonoBehaviour
AOVRequest.NewDefault(),
RTAllocator,
null, // lightFilter
new[] {
AOVBuffers.Output,
AOVBuffers.Color,
AOVBuffers.DepthStencil,
AOVBuffers.Normals,
AOVBuffers.MotionVectors
new[]
{
AOVBuffers.Output,
AOVBuffers.Color,
AOVBuffers.DepthStencil,
AOVBuffers.Normals,
AOVBuffers.MotionVectors
},
AovCallback
).Build();
).Build();
}
void OnDisable()

Просмотреть файл

@ -17,13 +17,14 @@ public class AOVOutputBuffer : MonoBehaviour
{
return _rt ?? (_rt = RTHandles.Alloc(_outputTexture.width, _outputTexture.height));
}
void AovCallback(
CommandBuffer cmd,
List<RTHandle> buffers,
RenderOutputProperties outProps
)
)
{
if(buffers.Count > 0)
if (buffers.Count > 0)
{
cmd.Blit(buffers[0], _outputTexture);
}
@ -42,11 +43,12 @@ public class AOVOutputBuffer : MonoBehaviour
aovRequest,
RTAllocator,
null, // lightFilter
new[] {
AOVBuffers.Output,
new[]
{
AOVBuffers.Output,
},
AovCallback
).Build();
).Build();
}
// Start is called before the first frame update
@ -58,6 +60,5 @@ public class AOVOutputBuffer : MonoBehaviour
// Update is called once per frame
void Update()
{
}
}

Просмотреть файл

@ -16,12 +16,13 @@ public class AOVOutputCustomPass : MonoBehaviour
{
return _rt ?? (_rt = RTHandles.Alloc(_outputTexture.width, _outputTexture.height));
}
void AovCallbackEx(
CommandBuffer cmd,
List<RTHandle> buffers,
List<RTHandle> customBuffers,
RenderOutputProperties outProps
)
)
{
if (buffers.Count > 0)
{
@ -50,7 +51,7 @@ public class AOVOutputCustomPass : MonoBehaviour
customPassAovBuffers,
bufferId => bufAlloc,
AovCallbackEx
).Build();
).Build();
}
// Start is called before the first frame update
@ -62,6 +63,5 @@ public class AOVOutputCustomPass : MonoBehaviour
// Update is called once per frame
void Update()
{
}
}

Просмотреть файл

@ -15,7 +15,7 @@ public class CameraMipBias : MonoBehaviour
{
if (m_camData != null)
return;
m_camData = GetComponentInParent<HDAdditionalCameraData>();
}

Просмотреть файл

@ -16,8 +16,8 @@ echo "Project: $project"
echo
for a in $platforms; do
for b in $pipelines; do
echo $unity -projectPath "$project" -forgetProjectPath -automated -testResults "$project/TestResults-$a-$b.xml" -logFile "$project/Log-$a-$b.log" -runTests -testPlatform $a
$unity -projectPath "$project" -forgetProjectPath -automated -testResults "$project/TestResults-$a-$b.xml" -logFile "$project/Log-$a-$b.log" -runTests -testPlatform $a
for b in $pipelines; do
echo $unity -projectPath "$project" -forgetProjectPath -automated -testResults "$project/TestResults-$a-$b.xml" -logFile "$project/Log-$a-$b.log" -runTests -testPlatform $a
$unity -projectPath "$project" -forgetProjectPath -automated -testResults "$project/TestResults-$a-$b.xml" -logFile "$project/Log-$a-$b.log" -runTests -testPlatform $a
done
done