Switched shaders to use multiply colour instead of additive
This commit is contained in:
parent
74b9882024
commit
eea35600d3
|
@ -43,7 +43,7 @@ void main()
|
||||||
{
|
{
|
||||||
position = In.vertPos;
|
position = In.vertPos;
|
||||||
normals = In.normal;
|
normals = In.normal;
|
||||||
albedo = texture(textures[nonuniformEXT(MatProp.data[In2.materialIndex].textureIndex)], In.uv) + MatProp.data[In2.materialIndex].color;
|
albedo = texture(textures[nonuniformEXT(MatProp.data[In2.materialIndex].textureIndex)], In.uv) * MatProp.data[In2.materialIndex].color;
|
||||||
|
|
||||||
outEntityID = In2.eid;
|
outEntityID = In2.eid;
|
||||||
lightLayerIndices = In2.lightLayerIndex;
|
lightLayerIndices = In2.lightLayerIndex;
|
||||||
|
|
Binary file not shown.
|
@ -67,7 +67,7 @@ namespace Sandbox
|
||||||
// Create Materials
|
// Create Materials
|
||||||
auto baseRaccoonMat = graphicsSystem->AddOrGetBaseMaterialInstance();
|
auto baseRaccoonMat = graphicsSystem->AddOrGetBaseMaterialInstance();
|
||||||
auto baseRaccoonMatInstant = graphicsSystem->AddMaterialInstanceCopy(baseRaccoonMat);
|
auto baseRaccoonMatInstant = graphicsSystem->AddMaterialInstanceCopy(baseRaccoonMat);
|
||||||
baseRaccoonMatInstant->SetProperty("data.color", SHVec4(0.0f, 0.0f, 0.0f, 1.0f));
|
baseRaccoonMatInstant->SetProperty("data.color", SHVec4(1.0f, 1.0f, 1.0f, 1.0f));
|
||||||
baseRaccoonMatInstant->SetProperty("data.textureIndex", 0);
|
baseRaccoonMatInstant->SetProperty("data.textureIndex", 0);
|
||||||
baseRaccoonMatInstant->SetProperty("data.alpha", 0.1f);
|
baseRaccoonMatInstant->SetProperty("data.alpha", 0.1f);
|
||||||
|
|
||||||
|
@ -189,7 +189,7 @@ namespace Sandbox
|
||||||
|
|
||||||
renderableShowcase.SetMesh(handles.front());
|
renderableShowcase.SetMesh(handles.front());
|
||||||
renderableShowcase.SetMaterial(baseRaccoonMatInstant);
|
renderableShowcase.SetMaterial(baseRaccoonMatInstant);
|
||||||
renderableShowcase.GetModifiableMaterial()->SetProperty("data.color", SHVec4(0.0f, 0.0f, 0.0f, 0.0f));
|
renderableShowcase.GetModifiableMaterial()->SetProperty("data.color", SHVec4(1.0f, 1.0f, 1.0f, 1.0f));
|
||||||
renderableShowcase.GetModifiableMaterial()->SetProperty("data.alpha", 1.0f);
|
renderableShowcase.GetModifiableMaterial()->SetProperty("data.alpha", 1.0f);
|
||||||
renderableShowcase.GetModifiableMaterial()->SetProperty("data.textureIndex", 0);
|
renderableShowcase.GetModifiableMaterial()->SetProperty("data.textureIndex", 0);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue