article thumbnail

Cocos Shader Tutorial 1.0 - about UV

Cocos

The vertical axes of textures and picture pixels is shown above, when sampling textures in shaders, that is from top to bottom, which is top-right corner. This is consistent with how most image file formats store pixel data, and with how most graphics APIs work (including DirectX, Vulkan, Metal, WebGPU, but not OpenGL).

Shaders 98
article thumbnail

Label Plus – An SDF-based BMFont generation and rendering plug-in is here!

Cocos

The issue for most developers is knowing how to use SDF with shaders to achieve these effects. One developer has built an excellent extension that allows you to not worry about this and develop more font styles, saving the shaders for you. Thanks to Signed Distance Fields or SDF, you can do this and so much more with them.

Render 98
Insiders

Sign Up for our Newsletter

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Trending Sources

article thumbnail

[Tutorial]Outer Stroke Effect for 2D Sprites

Cocos

Principle Since it’s an outer stroke, it doesn’t occupy the pixels of the original image to draw the edges. Remember the previous article, where we used the image’s Alpha to find edges, determining whether there were pixels with Alpha of 0 around the image. First, we get the uv of the surrounding pixel through the offset uv.

Sprite 52
article thumbnail

Unlocking GPU Intrinsics in HLSL

Nvidia

For example, a shader can use warp shuffle instructions to exchange data between threads in a warp without going through shared memory, which is especially valuable in pixel shaders where there is no shared memory. Or a shader can perform atomic additions on half-precision floating-point numbers in global memory.

Shaders 52
article thumbnail

[Share] 2D Post-Processing & Lighting Framework

Cocos

Post-processing effects, are used for further processing of rendered results to achieve various advanced and special effects. Analysis of 2D Post-Processing Solutions Cocos Creator currently lacks built-in support for post-processing in the 2D render phase, requiring developers to explore various approaches to achieve the rendering goals.

Render 52
article thumbnail

Maintenance release: Godot 3.4.2

Mircosoft Game Dev

just a few days ago with a huge array of bugfixes, but a regression was then found for macOS rendering which could cause flickering. Rendering: GLES2: Fix trunc shader function compilation on Android ( GH-56061 ). It is developed by Pixel-Archipel and scheduled to release in early 2022. We released Godot 3.4.1

Pixel 52
article thumbnail

Dev snapshot: Godot 4.0 alpha 15

Mircosoft Game Dev

Rendering: Octahedral normal/tangent compression ( GH-60309 ). Editor: Improvements to shader editor ( GH-63582 ). GUI: Add font LCD sub-pixel anti-aliasing support ( GH-64422 ). Rendering: Octahedral normal/tangent compression ( GH-60309 ). Rendering: Add font LCD sub-pixel anti-aliasing support ( GH-64422 ).

Alpha 52