浏览代码

Bump post version (#1883)

* Bump shader graph version dependency.

* Fix shader compile warnings
/main
GitHub 6 年前
当前提交
f44d2214
共有 5 个文件被更改,包括 33 次插入12 次删除
  1. 1
      com.unity.render-pipelines.high-definition/CHANGELOG.md
  2. 2
      com.unity.render-pipelines.high-definition/HDRP/Debug/DebugLightVolume.shader
  3. 2
      com.unity.render-pipelines.high-definition/package.json
  4. 2
      com.unity.render-pipelines.lightweight/package.json
  5. 38
      com.unity.shadergraph/Editor/Data/Util/ShaderGenerator.cs

1
com.unity.render-pipelines.high-definition/CHANGELOG.md


- Remove workaround for metal and vulkan in normal buffer encoding/decoding
- Fixed an issue with color picker not working in forward
- Fixed an issue where reseting HDLight do not reset all of its parameters
- Fixed shader compile warning in DebugLightVolumes.shader
### Changed
- Changed default reflection probe to be 256x256x6 and array size to be 64

2
com.unity.render-pipelines.high-definition/HDRP/Debug/DebugLightVolume.shader


{
VaryingsDefault output;
float3 positionRWS = TransformObjectToWorld(att.positionOS * _Range + _Offset);
float3 positionRWS = TransformObjectToWorld(att.positionOS.xyz * _Range + _Offset);
output.positionCS = TransformWorldToHClip(positionRWS);
return output;
}

2
com.unity.render-pipelines.high-definition/package.json


"unity": "2018.3",
"displayName": "HD Render Pipeline",
"dependencies": {
"com.unity.postprocessing": "2.0.10-preview",
"com.unity.postprocessing": "2.0.11-preview",
"com.unity.render-pipelines.core": "3.3.0-preview",
"com.unity.shadergraph": "3.3.0-preview"
}

2
com.unity.render-pipelines.lightweight/package.json


"unity": "2018.3",
"displayName": "Lightweight Render Pipeline",
"dependencies": {
"com.unity.postprocessing": "2.0.10-preview",
"com.unity.postprocessing": "2.0.11-preview",
"com.unity.render-pipelines.core": "3.3.0-preview",
"com.unity.shadergraph": "3.3.0-preview"
}

38
com.unity.shadergraph/Editor/Data/Util/ShaderGenerator.cs


{
var name = preferredCoordinateSpace.ToVariableName(InterpolatorType.Position);
var preferredSpacePosition = ConvertBetweenSpace("v.vertex", CoordinateSpace.Object, preferredCoordinateSpace, InputType.Position);
vertexShader.AppendLine("float3 {0} = {1};", name, preferredSpacePosition);
vertexShader.AppendLine("float3 {0} = {1}.xyz;", name, preferredSpacePosition);
if (graphModelRequirements.requiresPosition > 0)
{
vertexOutputStruct.AppendLine("float3 {0} : TEXCOORD{1};", name, interpolatorIndex);

}
return "error";
}
private static string DimensionToSwizzle(Dimension d)
{
switch (d)
{
case Dimension.One:
return "x";
case Dimension.Two:
return "xy";
case Dimension.Three:
return "xyz";
case Dimension.Four:
return "xyzw";
}
return "error";
}
public static void GenerateSpaceTranslations(
NeededCoordinateSpace neededSpaces,

Dimension dimension)
{
if ((neededSpaces & NeededCoordinateSpace.Object) > 0 && from != CoordinateSpace.Object)
pixelShader.AppendLine("float{0} {1} = {2};", DimensionToString(dimension),
CoordinateSpace.Object.ToVariableName(type), ConvertBetweenSpace(from.ToVariableName(type), from, CoordinateSpace.Object, inputType, from));
pixelShader.AppendLine("float{0} {1} = {2}.{3};", DimensionToString(dimension),
CoordinateSpace.Object.ToVariableName(type), ConvertBetweenSpace(from.ToVariableName(type), from, CoordinateSpace.Object, inputType, from),
DimensionToSwizzle(dimension));
pixelShader.AppendLine("float{0} {1} = {2};", DimensionToString(dimension),
CoordinateSpace.World.ToVariableName(type), ConvertBetweenSpace(from.ToVariableName(type), from, CoordinateSpace.World, inputType, from));
pixelShader.AppendLine("float{0} {1} = {2}.{3};", DimensionToString(dimension),
CoordinateSpace.World.ToVariableName(type), ConvertBetweenSpace(from.ToVariableName(type), from, CoordinateSpace.World, inputType, from),
DimensionToSwizzle(dimension));
pixelShader.AppendLine("float{0} {1} = {2};", DimensionToString(dimension),
pixelShader.AppendLine("float{0} {1} = {2}.{3};", DimensionToString(dimension),
ConvertBetweenSpace(from.ToVariableName(type), from, CoordinateSpace.View, inputType, from));
ConvertBetweenSpace(from.ToVariableName(type), from, CoordinateSpace.View, inputType, from),
DimensionToSwizzle(dimension));
pixelShader.AppendLine("float{0} {1} = {2};", DimensionToString(dimension),
pixelShader.AppendLine("float{0} {1} = {2}.{3};", DimensionToString(dimension),
ConvertBetweenSpace(from.ToVariableName(type), from, CoordinateSpace.Tangent, inputType, from));
ConvertBetweenSpace(from.ToVariableName(type), from, CoordinateSpace.Tangent, inputType, from),
DimensionToSwizzle(dimension));
}
public static string GetPreviewSubShader(AbstractMaterialNode node, ShaderGraphRequirements shaderGraphRequirements)

正在加载...
取消
保存