Android OpenGL ES Development shader

Source: Internet
Author: User

Shader is an important part of OpenGL ES.

Brief introduction

The shader program is a program that runs on the GPU and is a program written in GLSL language.

Function

With OpenGL shaders, you can enrich rendering, and the features you can implement include:

(1) More authentic materials-metal, stone, wood, etc.
(2) More realistic lighting effects-area lighting, soft shadows, etc.
(3) Natural phenomena-fire, smoke, water, clouds, etc.
(4) Advanced rendering effects-global illumination, Ray tracker, etc.
(5) Non-photo grade material-painting effect, pen writing effect, etc.
(6) Some new uses of texture memory-vector storage, fuzzy values, polynomial coefficients, etc.
(7) Process textures-Dynamically generated 2D, 3D textures, etc.
(8) Image processing-convolution, complex mixing, fuzzy masking sharpening processing (unsharp masking), etc.
(9) Animation effects-keyframe interpolation, particle system, program-defined motion, and more
(10) Custom anti-aliasing method
(11) General calculation-sequencing, mathematical modeling, fluid dynamics, etc.

Classification
  • Vertex shader vertices can be understood as each point that makes up an object.

    A vertex Shader is executed once for each vertex (vertex) that is sent to the GPU. The input data is: Attributes: Encapsulates data for each vertex using a vertex array, typically for variables with different vertices, such as vertex position, color, and so on.

    Output data: At least the location information should be output at the vertex shader stage-that is, the built-in variable: gl_position, which is the intrinsic varying of each point, representing the space position of the point. The other two optional variables are: Gl_frontfacing and gl_pointsize.

  • The fragment shader Fragment shader shader calculates the color and properties of each pixel.

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Android OpenGL ES Development shader

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.