Improved code
Former-commit-id: 33082b8f9d55c7a3b9550c788eb27fc613c08032
This commit is contained in:
@@ -242,6 +242,7 @@ void NzRenderer::DrawIndexedPrimitivesInstanced(unsigned int instanceCount, nzPr
|
||||
{
|
||||
GLenum type;
|
||||
const nzUInt8* ptr = reinterpret_cast<const nzUInt8*>(s_indexBuffer->GetPointer());
|
||||
|
||||
if (s_indexBuffer->HasLargeIndices())
|
||||
{
|
||||
ptr += firstIndex*sizeof(nzUInt32);
|
||||
|
||||
@@ -292,7 +292,6 @@ namespace
|
||||
sourceCode += "float intensity = light.r*0.3 + light.g*0.59 + light.b*0.11;\n"
|
||||
"vec3 emission = vec3(" + textureLookupKW + "(MaterialEmissiveMap, vTexCoord));\n"
|
||||
+ fragmentColorKW + " = vec4(mix(lighting, emission, clamp(1.0 - 3.0*intensity, 0.0, 1.0)), alpha);\n";
|
||||
///NOTE: Pour un shader avec un coût réduit avec une qualité moyenne, il est possible de remplacer "length(light)" par "dot(light, light)"
|
||||
}
|
||||
else
|
||||
sourceCode += fragmentColorKW + " = vec4(lighting, alpha);\n";
|
||||
|
||||
Reference in New Issue
Block a user