mirror of
https://github.com/overte-org/overte.git
synced 2025-04-08 21:33:00 +02:00
Merge pull request #14794 from SamGondelman/colors
Case 20888: Fix color space
This commit is contained in:
commit
3b84580e88
2 changed files with 3 additions and 3 deletions
|
@ -256,7 +256,7 @@ void ShapeEntityRenderer::doRender(RenderArgs* args) {
|
|||
batch.setModelTransform(_renderTransform); // use a transform with scale, rotation, registration point and translation
|
||||
materials = _materials["0"];
|
||||
auto& schema = materials.getSchemaBuffer().get<graphics::MultiMaterial::Schema>();
|
||||
outColor = glm::vec4(schema._albedo, schema._opacity);
|
||||
outColor = glm::vec4(ColorUtils::tosRGBVec3(schema._albedo), schema._opacity);
|
||||
outColor = EntityRenderer::calculatePulseColor(outColor, _pulseProperties, _created);
|
||||
if (_procedural.isReady()) {
|
||||
outColor = _procedural.getColor(outColor);
|
||||
|
@ -309,7 +309,7 @@ scriptable::ScriptableModelBase ShapeEntityRenderer::getScriptableModel() {
|
|||
result.appendMaterials(_materials);
|
||||
auto materials = _materials.find("0");
|
||||
if (materials != _materials.end()) {
|
||||
vertexColor = materials->second.getSchemaBuffer().get<graphics::MultiMaterial::Schema>()._albedo;
|
||||
vertexColor = ColorUtils::tosRGBVec3(materials->second.getSchemaBuffer().get<graphics::MultiMaterial::Schema>()._albedo);
|
||||
}
|
||||
}
|
||||
if (auto mesh = geometryCache->meshFromShape(geometryShape, vertexColor)) {
|
||||
|
|
|
@ -319,7 +319,7 @@ void batchSetter(const ShapePipeline& pipeline, gpu::Batch& batch, RenderArgs* a
|
|||
graphics::MultiMaterial::Schema schema;
|
||||
graphics::MaterialKey schemaKey;
|
||||
|
||||
schema._albedo = vec3(1.0f);
|
||||
schema._albedo = ColorUtils::sRGBToLinearVec3(vec3(1.0f));
|
||||
schema._opacity = 1.0f;
|
||||
schema._metallic = 0.1f;
|
||||
schema._roughness = 0.9f;
|
||||
|
|
Loading…
Reference in a new issue