Skip to content

Commit

Permalink
Fixed issue with glow compositing
Browse files Browse the repository at this point in the history
  • Loading branch information
TrajansRow committed Aug 22, 2024
1 parent da9a142 commit 41fa29b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
6 changes: 3 additions & 3 deletions Source_Files/RenderMain/DrawCache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -648,12 +648,12 @@ void DrawCache::drawAll() {
geometry[g].shader->setFloat(Shader::U_BloomScale, geometry[g].bloomScale);
geometry[g].shader->setFloat(Shader::U_BloomShift, geometry[g].bloomShift);
geometry[g].shader->setFloat(Shader::U_Flare, geometry[g].flare);
geometry[g].shader->setFloat(Shader::U_SelfLuminosity, selfLuminosity);
geometry[g].shader->setFloat(Shader::U_SelfLuminosity, geometry[g].selfLuminosity);
geometry[g].shader->setFloat(Shader::U_Pulsate, geometry[g].pulsate);
geometry[g].shader->setFloat(Shader::U_Wobble, geometry[g].wobble);
geometry[g].shader->setFloat(Shader::U_Depth, geometry[g].depth);
geometry[g].shader->setFloat(Shader::U_Glow, glow);
geometry[g].shader->setFloat(Shader::U_StrictDepthMode, strictDepthMode);
geometry[g].shader->setFloat(Shader::U_Glow, geometry[g].glow);
geometry[g].shader->setFloat(Shader::U_StrictDepthMode, strictDepthMode); //Not sure what this is for, or it it works yet.

//U_TransferFadeOut //TODO: needs to be captured.
//U_Visibility //TODO: needs to be captured.
Expand Down
2 changes: 1 addition & 1 deletion Source_Files/RenderMain/OGL_Textures.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1868,7 +1868,7 @@ void FindSilhouetteVersion(ImageDescriptorManager &imageManager)
FindSilhouetteVersionDXTC35(imageManager.edit()->GetBufferSize(), (unsigned char *) imageManager.edit()->GetBuffer());
} else if (imageManager.get()->GetFormat() == ImageDescriptor::PVRTC2 || imageManager.get()->GetFormat() == ImageDescriptor::PVRTC2)
{
printf("FindSilhouetteVersion not implemented for PVRTC of size %d\n", imageManager.edit()->GetBufferSize());
fprintf(stderr, "FindSilhouetteVersion not implemented for PVRTC of size %d\n", imageManager.edit()->GetBufferSize());
}

imageManager.edit()->PremultipliedAlpha = false;
Expand Down
13 changes: 8 additions & 5 deletions Source_Files/RenderMain/RenderRasterize_Shader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1264,17 +1264,20 @@ bool RenderModel(rectangle_definition& RenderRectangle, short Collection, short
//glAlphaFunc(GL_GREATER, 0.001); //NOT SUPPORTED ANGLE FUNCTION

s->enable();
s->setFloat(Shader::U_Glow, SkinPtr->MinGlowIntensity);
//s->setFloat(Shader::U_Glow, SkinPtr->MinGlowIntensity);
DC()->cacheGlow(SkinPtr->MinGlowIntensity);
if (renderStep == kGlow) {
s->setFloat(Shader::U_BloomScale, SkinPtr->GlowBloomScale);
s->setFloat(Shader::U_BloomShift, SkinPtr->GlowBloomShift);
//s->setFloat(Shader::U_BloomScale, SkinPtr->GlowBloomScale);
//s->setFloat(Shader::U_BloomShift, SkinPtr->GlowBloomShift);
DC()->cacheBloomScale(SkinPtr->GlowBloomScale);
DC()->cacheBloomShift(SkinPtr->GlowBloomShift);
}

if(ModelPtr->Use(CLUT,OGL_SkinManager::Glowing)) {
LoadModelSkin(SkinPtr->GlowImg, Collection, CLUT);
}
/*Shader* lastShader = lastEnabledShader();

/*Shader* lastShader = lastEnabledShader();
if (lastShader) {
GLfloat modelMatrix[16], projectionMatrix[16], modelProjection[16], modelMatrixInverse[16], textureMatrix[16];
Expand Down

0 comments on commit 41fa29b

Please sign in to comment.