Switched to bool in shader while sending ints!

This commit is contained in:
antopilo
2025-01-12 22:34:25 -05:00
parent 8c592ba87b
commit 37fd764248
5 changed files with 26 additions and 27 deletions

View File

@@ -27,12 +27,12 @@ SamplerState mySampler : register(s0);
// Materials
struct Material
{
float hasAlbedo;
bool hasAlbedo;
float3 albedo;
int hasNormal;
int hasMetalness;
int hasRoughness;
int hasAO;
bool hasNormal;
bool hasMetalness;
bool hasRoughness;
bool hasAO;
float metalnessValue;
float roughnessValue;
float aoValue;

View File

@@ -27,12 +27,12 @@ SamplerState mySampler : register(s0);
// Materials
struct Material
{
float hasAlbedo;
bool hasAlbedo;
float3 albedo;
int hasNormal;
int hasMetalness;
int hasRoughness;
int hasAO;
bool hasNormal;
bool hasMetalness;
bool hasRoughness;
bool hasAO;
float metalnessValue;
float roughnessValue;
float aoValue;

View File

@@ -27,12 +27,12 @@ SamplerState mySampler : register(s0);
// Materials
struct Material
{
float hasAlbedo;
bool hasAlbedo;
float3 albedo;
int hasNormal;
int hasMetalness;
int hasRoughness;
int hasAO;
bool hasNormal;
bool hasMetalness;
bool hasRoughness;
bool hasAO;
float metalnessValue;
float roughnessValue;
float aoValue;

View File

@@ -27,12 +27,12 @@ SamplerState mySampler : register(s0);
// Materials
struct Material
{
float hasAlbedo;
bool hasAlbedo;
float3 albedo;
int hasNormal;
int hasMetalness;
int hasRoughness;
int hasAO;
bool hasNormal;
bool hasMetalness;
bool hasRoughness;
bool hasAO;
float metalnessValue;
float roughnessValue;
float aoValue;
@@ -116,9 +116,8 @@ PSOutput main(PSInput input)
{
// Sample from texture.
}
normal = mul(input.TBN, normal);
normal = normal / 2.0f + 0.5f;
normal = input.Normal / 2.0f + 0.5f;
output.oNormal = float4(normal, 1.0f);
// MATERIAL

View File

@@ -27,12 +27,12 @@ SamplerState mySampler : register(s0);
// Materials
struct Material
{
float hasAlbedo;
bool hasAlbedo;
float3 albedo;
int hasNormal;
int hasMetalness;
int hasRoughness;
int hasAO;
bool hasNormal;
bool hasMetalness;
bool hasRoughness;
bool hasAO;
float metalnessValue;
float roughnessValue;
float aoValue;