Android Open Source - mgcube Trans Shader






From Project

Back to project page mgcube.

License

The source code is released under:

qp is licensed under the Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported http://creativecommons.org/licenses/by-nc-nd/3.0/ Your are not allowed to publish this game under your name.

If you think the Android project mgcube listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package de.redlion.qb.shader;
/*  w  w w. j  a va  2  s.co m*/
public class TransShader {

    public static final String mVertexShader =
      "attribute vec4 a_position;\n" +
      "uniform mat4 VPMatrix;\n"+
      "uniform mat4 MMatrix;\n"+
      "void main() {\n"+
      "  gl_Position = ((VPMatrix * MMatrix) * a_position);\n"+
      "}\n";

    public static final String mFragmentShader =   
        "#ifdef GL_ES\n" +
        "precision mediump float;\n" +
        "#endif\n" +
        "uniform vec4 a_color;\n"+
      "void main() {\n"+
      "  gl_FragColor = a_color;\n"+
      "}\n"; 
}

/** Precision qualifiers gain one frame on milestone but break desktop support an look a bit uglier
public static final String mVertexShader =
  "attribute highp vec4 a_vertex;\n" +
  "uniform mediump mat4 VPMatrix;\n"+
  "uniform mediump mat4 MMatrix;\n"+
  "void main() {\n"+
  "  gl_Position = VPMatrix * MMatrix * a_vertex;\n"+
  "}\n";

public static final String mFragmentShader =   libgd
    "#ifdef GL_ES\n" +
    "precision mediump float;\n" +
    "#endif\n" +
    "uniform lowp vec4 a_color;\n"+
  "void main() {\n"+
  "  gl_FragColor = a_color;\n"+
  "}\n";
**/




Java Source Code List

de.redlion.qb.Block.java
de.redlion.qb.Constants.java
de.redlion.qb.DefaultScreen.java
de.redlion.qb.EditorBlock.java
de.redlion.qb.EditorScreen.java
de.redlion.qb.GameInstance.java
de.redlion.qb.GameScreen.java
de.redlion.qb.Helper.java
de.redlion.qb.HighScoreManager.java
de.redlion.qb.HighScoreTimeAttack.java
de.redlion.qb.HighScore.java
de.redlion.qb.IntroScreen.java
de.redlion.qb.LZW.java
de.redlion.qb.LevelButton.java
de.redlion.qb.LevelSelectScreen.java
de.redlion.qb.MainActivity.java
de.redlion.qb.MainMenuScreenReduced.java
de.redlion.qb.MainMenuScreen.java
de.redlion.qb.Main.java
de.redlion.qb.MovableBlock.java
de.redlion.qb.OptionsScreen.java
de.redlion.qb.Player.java
de.redlion.qb.Portal.java
de.redlion.qb.QBLogo.java
de.redlion.qb.Renderable.java
de.redlion.qb.Resources.java
de.redlion.qb.RobovmLauncher.java
de.redlion.qb.ScreenshotSaver.java
de.redlion.qb.Starter.java
de.redlion.qb.Switch.java
de.redlion.qb.SwitchableBlock.java
de.redlion.qb.Target.java
de.redlion.qb.TutorialScreen.java
de.redlion.qb.client.GwtLauncher.java
de.redlion.qb.shader.FastBloomShader.java
de.redlion.qb.shader.TVShader.java
de.redlion.qb.shader.TransShader.java