Merge pull request #170 from SHADE-DP/Fix-MultiplyShader
Switched shaders to use multiply colour instead of additive
This commit is contained in:
commit
c7f6ded5ae
|
@ -43,7 +43,7 @@ void main()
|
|||
{
|
||||
position = In.vertPos;
|
||||
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;
|
||||
lightLayerIndices = In2.lightLayerIndex;
|
||||
|
|
Binary file not shown.
|
@ -67,7 +67,7 @@ namespace Sandbox
|
|||
// Create Materials
|
||||
auto baseRaccoonMat = graphicsSystem->AddOrGetBaseMaterialInstance();
|
||||
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.alpha", 0.1f);
|
||||
|
||||
|
@ -189,7 +189,7 @@ namespace Sandbox
|
|||
|
||||
renderableShowcase.SetMesh(handles.front());
|
||||
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.textureIndex", 0);
|
||||
|
||||
|
|
Loading…
Reference in New Issue