MCPcopy Create free account
hub / github.com/Card-Forge/forge / drawPortalFade

Method drawPortalFade

forge-gui-mobile/src/forge/Graphics.java:1023–1043  ·  view source on GitHub ↗
(TextureRegion image, float x, float y, float w, float h, Float time, boolean opaque)

Source from the content-addressed store, hash-verified

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)

Callers 3

drawBackgroundMethod · 0.80
drawBackgroundMethod · 0.80
drawBackgroundMethod · 0.80

Calls 4

drawImageMethod · 0.95
drawMethod · 0.65
endMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected