mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 03:58:07 +02:00
fix color space
This commit is contained in:
parent
faeb5b36dc
commit
e41f5617e9
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
|
batch.setModelTransform(_renderTransform); // use a transform with scale, rotation, registration point and translation
|
||||||
materials = _materials["0"];
|
materials = _materials["0"];
|
||||||
auto& schema = materials.getSchemaBuffer().get<graphics::MultiMaterial::Schema>();
|
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);
|
outColor = EntityRenderer::calculatePulseColor(outColor, _pulseProperties, _created);
|
||||||
if (_procedural.isReady()) {
|
if (_procedural.isReady()) {
|
||||||
outColor = _procedural.getColor(outColor);
|
outColor = _procedural.getColor(outColor);
|
||||||
|
@ -309,7 +309,7 @@ scriptable::ScriptableModelBase ShapeEntityRenderer::getScriptableModel() {
|
||||||
result.appendMaterials(_materials);
|
result.appendMaterials(_materials);
|
||||||
auto materials = _materials.find("0");
|
auto materials = _materials.find("0");
|
||||||
if (materials != _materials.end()) {
|
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)) {
|
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::MultiMaterial::Schema schema;
|
||||||
graphics::MaterialKey schemaKey;
|
graphics::MaterialKey schemaKey;
|
||||||
|
|
||||||
schema._albedo = vec3(1.0f);
|
schema._albedo = ColorUtils::sRGBToLinearVec3(vec3(1.0f));
|
||||||
schema._opacity = 1.0f;
|
schema._opacity = 1.0f;
|
||||||
schema._metallic = 0.1f;
|
schema._metallic = 0.1f;
|
||||||
schema._roughness = 0.9f;
|
schema._roughness = 0.9f;
|
||||||
|
|
Loading…
Reference in a new issue