mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 17:39:26 +02:00
A bunch of typo fixes after review
This commit is contained in:
parent
e72035ee3d
commit
89920370db
7 changed files with 10 additions and 14 deletions
|
@ -1,5 +1,5 @@
|
||||||
//
|
//
|
||||||
// debug.js
|
// ddebugFramBuffer.js
|
||||||
// examples/utilities/tools/render
|
// examples/utilities/tools/render
|
||||||
//
|
//
|
||||||
// Sam Gateau created on 2/18/2016.
|
// Sam Gateau created on 2/18/2016.
|
||||||
|
@ -10,8 +10,8 @@
|
||||||
//
|
//
|
||||||
|
|
||||||
var DDB = Render.RenderDeferredTask.DebugDeferredBuffer;
|
var DDB = Render.RenderDeferredTask.DebugDeferredBuffer;
|
||||||
DDB.enabled = true;
|
|
||||||
oldConfig = DDB.toJSON();
|
oldConfig = DDB.toJSON();
|
||||||
|
DDB.enabled = true;
|
||||||
|
|
||||||
|
|
||||||
// Set up the qml ui
|
// Set up the qml ui
|
||||||
|
|
|
@ -150,6 +150,6 @@ void Light::setAmbientMap(gpu::TexturePointer ambientMap) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Light::setAmbientMapNumMips(int numMips) {
|
void Light::setAmbientMapNumMips(uint16_t numMips) {
|
||||||
editSchema()._ambientMapNumMips = (float)numMips;
|
editSchema()._ambientMapNumMips = (float)numMips;
|
||||||
}
|
}
|
||||||
|
|
|
@ -111,8 +111,8 @@ public:
|
||||||
void setAmbientMap(gpu::TexturePointer ambientMap);
|
void setAmbientMap(gpu::TexturePointer ambientMap);
|
||||||
gpu::TexturePointer getAmbientMap() const { return _ambientMap; }
|
gpu::TexturePointer getAmbientMap() const { return _ambientMap; }
|
||||||
|
|
||||||
void setAmbientMapNumMips(int numMips);
|
void setAmbientMapNumMips(uint16_t numMips);
|
||||||
int getAmbientMapNumMips() const { return getSchema()._ambientMapNumMips; }
|
uint16_t getAmbientMapNumMips() const { return (uint16_t) getSchema()._ambientMapNumMips; }
|
||||||
|
|
||||||
// Schema to access the attribute values of the light
|
// Schema to access the attribute values of the light
|
||||||
class Schema {
|
class Schema {
|
||||||
|
@ -126,7 +126,7 @@ public:
|
||||||
Vec4 _spot{0.0f, 0.0f, 0.0f, 0.0f};
|
Vec4 _spot{0.0f, 0.0f, 0.0f, 0.0f};
|
||||||
Vec4 _shadow{0.0f};
|
Vec4 _shadow{0.0f};
|
||||||
|
|
||||||
float _ambientMapNumMips{ 0 };
|
float _ambientMapNumMips{ 0.0f };
|
||||||
Vec3 _control{ 0.0f, 0.0f, 0.0f };
|
Vec3 _control{ 0.0f, 0.0f, 0.0f };
|
||||||
|
|
||||||
gpu::SphericalHarmonics _ambientSphere;
|
gpu::SphericalHarmonics _ambientSphere;
|
||||||
|
|
|
@ -252,7 +252,7 @@ public:
|
||||||
class Schema {
|
class Schema {
|
||||||
public:
|
public:
|
||||||
glm::vec3 _emissive{ 0.0f }; // No Emissive
|
glm::vec3 _emissive{ 0.0f }; // No Emissive
|
||||||
float _opacity{ 1.f }; // Opacity = 1 => Not Transparent
|
float _opacity{ 1.0f }; // Opacity = 1 => Not Transparent
|
||||||
|
|
||||||
glm::vec3 _albedo{ 0.5f }; // Grey albedo => isAlbedo
|
glm::vec3 _albedo{ 0.5f }; // Grey albedo => isAlbedo
|
||||||
float _roughness{ 1.0f }; // Roughness = 1 => Not Glossy
|
float _roughness{ 1.0f }; // Roughness = 1 => Not Glossy
|
||||||
|
|
|
@ -65,7 +65,7 @@ vec3 evalAmbientSphereGlobalColor(mat4 invViewMat, float shadowAttenuation, floa
|
||||||
<$declareSkyboxMap()$>
|
<$declareSkyboxMap()$>
|
||||||
|
|
||||||
vec3 fresnelSchlickAmbient(vec3 fresnelColor, vec3 lightDir, vec3 halfDir, float gloss) {
|
vec3 fresnelSchlickAmbient(vec3 fresnelColor, vec3 lightDir, vec3 halfDir, float gloss) {
|
||||||
return fresnelColor + (max(vec3(gloss), fresnelColor) - fresnelColor) * pow(1.0f - clamp(dot(lightDir, halfDir), 0.0, 1.0), 5);
|
return fresnelColor + (max(vec3(gloss), fresnelColor) - fresnelColor) * pow(1.0 - clamp(dot(lightDir, halfDir), 0.0, 1.0), 5);
|
||||||
}
|
}
|
||||||
|
|
||||||
vec3 evalSkyboxGlobalColor(mat4 invViewMat, float shadowAttenuation, float obscurance, vec3 position, vec3 normal, vec3 albedo, float metallic, vec3 emissive, float roughness) {
|
vec3 evalSkyboxGlobalColor(mat4 invViewMat, float shadowAttenuation, float obscurance, vec3 position, vec3 normal, vec3 albedo, float metallic, vec3 emissive, float roughness) {
|
||||||
|
|
|
@ -92,7 +92,7 @@ void DeferredLightingEffect::init() {
|
||||||
// Add the global light to the light stage (for later shadow rendering)
|
// Add the global light to the light stage (for later shadow rendering)
|
||||||
_lightStage.addLight(lp);
|
_lightStage.addLight(lp);
|
||||||
|
|
||||||
lp->setDirection(-glm::vec3(1.0f, 1.0f, 1.0f));
|
lp->setDirection(glm::vec3(-1.0f));
|
||||||
lp->setColor(glm::vec3(1.0f));
|
lp->setColor(glm::vec3(1.0f));
|
||||||
lp->setIntensity(1.0f);
|
lp->setIntensity(1.0f);
|
||||||
lp->setType(model::Light::SUN);
|
lp->setType(model::Light::SUN);
|
||||||
|
@ -502,7 +502,6 @@ void DeferredLightingEffect::setupKeyLightBatch(gpu::Batch& batch, int lightBuff
|
||||||
batch.setUniformBuffer(lightBufferUnit, globalLight->getSchemaBuffer());
|
batch.setUniformBuffer(lightBufferUnit, globalLight->getSchemaBuffer());
|
||||||
}
|
}
|
||||||
|
|
||||||
// if (_skyboxTexture && (skyboxCubemapUnit >= 0)) {
|
|
||||||
if (globalLight->getAmbientMap() && (skyboxCubemapUnit >= 0)) {
|
if (globalLight->getAmbientMap() && (skyboxCubemapUnit >= 0)) {
|
||||||
batch.setResourceTexture(skyboxCubemapUnit, globalLight->getAmbientMap());
|
batch.setResourceTexture(skyboxCubemapUnit, globalLight->getAmbientMap());
|
||||||
}
|
}
|
||||||
|
@ -571,12 +570,10 @@ void DeferredLightingEffect::setGlobalLight(const model::LightPointer& light, co
|
||||||
globalLight->setAmbientIntensity(light->getAmbientIntensity());
|
globalLight->setAmbientIntensity(light->getAmbientIntensity());
|
||||||
globalLight->setAmbientSphere(light->getAmbientSphere());
|
globalLight->setAmbientSphere(light->getAmbientSphere());
|
||||||
|
|
||||||
// _skyboxTexture = skyboxTexture;
|
|
||||||
_skyboxTexture = (light->getAmbientMap() ? light->getAmbientMap() : _skyboxTexture);
|
_skyboxTexture = (light->getAmbientMap() ? light->getAmbientMap() : _skyboxTexture);
|
||||||
|
|
||||||
// Update the available mipmap levels
|
// Update the available mipmap levels
|
||||||
globalLight->setAmbientMap((light->getAmbientMap() ? light->getAmbientMap() : _skyboxTexture));
|
globalLight->setAmbientMap(_skyboxTexture);
|
||||||
// globalLight->setAmbientMapNumMips((_skyboxTexture ? _skyboxTexture->evalNumMips() : 0));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
model::MeshPointer DeferredLightingEffect::getSpotLightMesh() {
|
model::MeshPointer DeferredLightingEffect::getSpotLightMesh() {
|
||||||
|
|
|
@ -414,7 +414,6 @@ ShapeKey ModelMeshPartPayload::getShapeKey() const {
|
||||||
|
|
||||||
bool isTranslucent = drawMaterialKey.isTransparent() || drawMaterialKey.isTransparentMap();
|
bool isTranslucent = drawMaterialKey.isTransparent() || drawMaterialKey.isTransparentMap();
|
||||||
bool hasTangents = drawMaterialKey.isNormalMap() && !mesh.tangents.isEmpty();
|
bool hasTangents = drawMaterialKey.isNormalMap() && !mesh.tangents.isEmpty();
|
||||||
//bool hasSpecular = drawMaterialKey.isGlossMap();
|
|
||||||
bool hasSpecular = drawMaterialKey.isMetallicMap();
|
bool hasSpecular = drawMaterialKey.isMetallicMap();
|
||||||
bool hasLightmap = drawMaterialKey.isLightmapMap();
|
bool hasLightmap = drawMaterialKey.isLightmapMap();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue