Skip to content

Commit

Permalink
Fix sRGB in processor
Browse files Browse the repository at this point in the history
  • Loading branch information
riccardobl committed Dec 1, 2023
1 parent 069451a commit 33e8b7b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/com/jme/effekseer/jme3/EffekseerProcessor.java
Original file line number Diff line number Diff line change
Expand Up @@ -75,15 +75,15 @@ protected FrameBuffer getRenderTarget(ViewPort viewPort, FrameBuffer in, boolea
int height=viewPort.getCamera().getHeight();

Format depthFormat=Format.Depth;
Format colorFormat=Format.RGB16F;
Format colorFormat=Format.RGB8;

if(renderTarget == null || renderTarget.getWidth() != width || renderTarget.getHeight() != height || renderTarget.isSrgb()!=sRGB){
System.out.println("Create render target " + width + "x" + height);
if(renderTarget != null) renderTarget.dispose();
renderTarget=new FrameBuffer(width,height,1);
renderTarget.setDepthTexture(new Texture2D(width,height,1,depthFormat));
renderTarget.setColorTexture(new Texture2D(width,height,1,colorFormat));
if(sRGB){
if(sRGB){
System.out.println("Enable sRGB");
renderTarget.getColorBuffer().getTexture().getImage().setColorSpace(ColorSpace.sRGB);
renderTarget.setSrgb(sRGB);
Expand Down

0 comments on commit 33e8b7b

Please sign in to comment.