Skip to content

Commit 78a614f

Browse files
authored
Disabling speedtree warning about pow and vector truncation (#147)
1 parent 0b856a4 commit 78a614f

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

com.unity.render-pipelines.universal/Shaders/Nature/SpeedTree7BillboardPasses.hlsl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
#ifndef UNIVERSAL_SPEEDTREE7BILLBOARD_PASSES_INCLUDED
22
#define UNIVERSAL_SPEEDTREE7BILLBOARD_PASSES_INCLUDED
33

4-
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
54
#include "SpeedTree7CommonPasses.hlsl"
5+
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
6+
67

78
void InitializeData(inout SpeedTreeVertexInput input, out half2 outUV, out half outHueVariation)
89
{

com.unity.render-pipelines.universal/Shaders/Nature/SpeedTree7CommonPasses.hlsl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
#ifndef UNIVERSAL_SPEEDTREE7COMMON_PASSES_INCLUDED
22
#define UNIVERSAL_SPEEDTREE7COMMON_PASSES_INCLUDED
33

4+
// Disable warnings we aren't interested in
5+
#pragma warning (disable : 3571) // "pow(f,e) will not work for negative f"; however in majority of our calls to pow we know f is not negative
6+
#pragma warning (disable : 3206) // implicit truncation of vector type
7+
48
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
59

610
struct SpeedTreeVertexInput

com.unity.render-pipelines.universal/Shaders/Nature/SpeedTree7Passes.hlsl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#ifndef UNIVERSAL_SPEEDTREE7_PASSES_INCLUDED
22
#define UNIVERSAL_SPEEDTREE7_PASSES_INCLUDED
33

4-
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
54
#include "SpeedTree7CommonPasses.hlsl"
5+
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
66

77
void InitializeData(inout SpeedTreeVertexInput input, float lodValue)
88
{

0 commit comments

Comments
 (0)