(TextureRegion image, float x, float y, float w, float h, Float time, boolean opaque)
| 1021 | } |
| 1022 | |
| 1023 | public void drawPortalFade(TextureRegion image, float x, float y, float w, float h, Float time, boolean opaque) { |
| 1024 | if (image == null) |
| 1025 | return; |
| 1026 | if (time != null) { |
| 1027 | batch.end(); |
| 1028 | shaderPortal.bind(); |
| 1029 | shaderPortal.setUniformf("u_resolution", image.getRegionWidth(), image.getRegionHeight()); |
| 1030 | shaderPortal.setUniformf("u_time", time); |
| 1031 | shaderPortal.setUniformf("u_opaque", opaque ? 1f : 0f); |
| 1032 | batch.setShader(shaderPortal); |
| 1033 | batch.begin(); |
| 1034 | //draw |
| 1035 | batch.draw(image, x, y, w, h); |
| 1036 | //reset |
| 1037 | batch.end(); |
| 1038 | batch.setShader(null); |
| 1039 | batch.begin(); |
| 1040 | } else { |
| 1041 | drawImage(image, x, y, w, h); |
| 1042 | } |
| 1043 | } |
| 1044 | |
| 1045 | public void drawHueShift(Texture image, float x, float y, float w, float h, Float time) { |
| 1046 | if (image == null) |
no test coverage detected