Avoid RGB111110F in filters unless its actually supported
This commit is contained in:
parent
af3a0c70ce
commit
b0316e419c
@ -213,13 +213,10 @@ public abstract class Filter implements Savable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* returns the default pass texture format
|
* returns the default pass texture format.
|
||||||
* default is {@link Format#RGB111110F}
|
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
protected Format getDefaultPassTextureFormat() {
|
protected Format getDefaultPassTextureFormat() {
|
||||||
return Format.RGB111110F;
|
return processor.getDefaultPassTextureFormat();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -144,8 +144,12 @@ public class FilterPostProcessor implements SceneProcessor, Savable {
|
|||||||
fsQuad.setWidth(1);
|
fsQuad.setWidth(1);
|
||||||
fsQuad.setHeight(1);
|
fsQuad.setHeight(1);
|
||||||
|
|
||||||
if (fbFormat == Format.RGB111110F && !renderer.getCaps().contains(Caps.PackedFloatTexture)) {
|
if (!renderer.getCaps().contains(Caps.PackedFloatTexture)) {
|
||||||
fbFormat = Format.RGB8;
|
if (!renderer.getCaps().contains(Caps.FloatTexture)) {
|
||||||
|
fbFormat = Format.RGB8;
|
||||||
|
} else {
|
||||||
|
fbFormat = Format.RGB16F;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Camera cam = vp.getCamera();
|
Camera cam = vp.getCamera();
|
||||||
@ -161,6 +165,10 @@ public class FilterPostProcessor implements SceneProcessor, Savable {
|
|||||||
reshape(vp, cam.getWidth(), cam.getHeight());
|
reshape(vp, cam.getWidth(), cam.getHeight());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Format getDefaultPassTextureFormat() {
|
||||||
|
return fbFormat;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* init the given filter
|
* init the given filter
|
||||||
* @param filter
|
* @param filter
|
||||||
|
Loading…
x
Reference in New Issue
Block a user