![]() These are refered to as Default Shaders and are the most common way of displaying things in AGK, if you want to see the code that AGK created for an object you can use GetObjectMeshVSSource and GetObjectMeshPSSource, and use this as the basis for a Custom Shader.Ĭustom shaders are shaders that you write yourself and load into AGK, this is to cover use cases that AGK can't handle with its Default Shaders. For 2D items it uses the same shader for everything to improve performance, but for 3D objects AGK will look at the object properties, such as the number of textures it uses, and create a shader for it. Types of ShaderĮverything in AGK requires a shader to appear on the screen, this includes sprites, text, and 3D objects. However you cannot use the "#version" definition sometimes used on desktop platforms, or the "precision highp float" definition sometimes used on mobile platforms, these will be added automatically by AGK. Any shaders that you write yourself must be compatible with both desktop and mobile versions, thankfully OpenGL 2.0 and OpenGL ES 2.0 are almost identical in this regard. ![]() AGK uses shaders written in the OpenGL 2.0 Shading Language (GLSL version 110) on desktop platforms, and OpenGL ES 2.0 shaders on mobile platforms.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |