(FImage image, float x, float y, float w, float h, Float amount, boolean flipY)
| 1124 | } |
| 1125 | |
| 1126 | public void drawPixelated(FImage image, float x, float y, float w, float h, Float amount, boolean flipY) { |
| 1127 | if (image == null) |
| 1128 | return; |
| 1129 | if (amount != null) { |
| 1130 | batch.end(); |
| 1131 | shaderPixelate.bind(); |
| 1132 | shaderPixelate.setUniformf("u_resolution", Forge.isLandscapeMode() ? w : h, Forge.isLandscapeMode() ? h : w); |
| 1133 | shaderPixelate.setUniformf("u_cellSize", amount); |
| 1134 | shaderPixelate.setUniformf("u_yflip", flipY ? 1f : 0f); |
| 1135 | shaderPixelate.setUniformf("u_bias", 0.7f); |
| 1136 | batch.setShader(shaderPixelate); |
| 1137 | batch.begin(); |
| 1138 | //draw |
| 1139 | image.draw(this, x, y, w, h); |
| 1140 | //reset |
| 1141 | batch.end(); |
| 1142 | batch.setShader(null); |
| 1143 | batch.begin(); |
| 1144 | } else { |
| 1145 | drawImage(image, x, y, w, h); |
| 1146 | } |
| 1147 | } |
| 1148 | |
| 1149 | public void drawPixelated(TextureRegion image, float x, float y, float w, float h, Float amount, boolean flipY) { |
| 1150 | if (image == null) |
nothing calls this directly
no test coverage detected