public LensFlareTexturePanel() { super(); orthographicMatrix = new Matrix4f().Orthographic2D(); orthoTransform = new Transform(); setConfig(new AdditiveBlending()); setShader(LensFlareShader.getInstance()); }
public UIElement(int xPos, int yPos, int xScaling, int yScaling){ super(); setOrthographicMatrix(new Matrix4f().Orthographic2D()); getWorldTransform().setTranslation(xPos, yPos, 0); getWorldTransform().setScaling(xScaling, yScaling, 0); setOrthographicMatrix(getOrthographicMatrix().mul(getWorldTransform().getWorldMatrix())); }
texturePanel0.setTexture(new Texture2DBilinearFilter("textures/lens_flare/tex4.png")); texturePanel0.getOrthoTransform().setScaling(200,200,0); texturePanel0.setOrthographicMatrix(new Matrix4f().Orthographic2D().mul(texturePanel0.getOrthoTransform().getWorldMatrix())); texturePanel0.setSpacing(0.06f); texturePanel0.setBrightness(0.2f); texturePanel1.setTexture(new Texture2DBilinearFilter("textures/lens_flare/tex01.png")); texturePanel1.getOrthoTransform().setScaling(400,400,0); texturePanel1.setOrthographicMatrix(new Matrix4f().Orthographic2D().mul(texturePanel1.getOrthoTransform().getWorldMatrix())); texturePanel1.setSpacing(0.0f); texturePanel1.setBrightness(0.4f); texturePanel2.setTexture(new Texture2DBilinearFilter("textures/lens_flare/tex2.png")); texturePanel2.getOrthoTransform().setScaling(250,250,0); texturePanel2.setOrthographicMatrix(new Matrix4f().Orthographic2D().mul(texturePanel2.getOrthoTransform().getWorldMatrix())); texturePanel2.setSpacing(0.2f); texturePanel2.setBrightness(0.25f); texturePanel3.setTexture(new Texture2DBilinearFilter("textures/lens_flare/tex7.png")); texturePanel3.getOrthoTransform().setScaling(200,200,0); texturePanel3.setOrthographicMatrix(new Matrix4f().Orthographic2D().mul(texturePanel3.getOrthoTransform().getWorldMatrix())); texturePanel3.setSpacing(0.4f); texturePanel3.setBrightness(0.2f); texturePanel4.setTexture(new Texture2DBilinearFilter("textures/lens_flare/tex5.png")); texturePanel4.getOrthoTransform().setScaling(100,100,0); texturePanel4.setOrthographicMatrix(new Matrix4f().Orthographic2D().mul(texturePanel4.getOrthoTransform().getWorldMatrix())); texturePanel4.setSpacing(0.6f); texturePanel4.setBrightness(0.2f);
- lensFlareTexture.getOrthoTransform().getScaling().getY()/2f); lensFlareTexture.setOrthographicMatrix( new Matrix4f().Orthographic2D().mul(lensFlareTexture.getOrthoTransform().getWorldMatrix()));