lwjgl-basics | : wrench : LibGDX/LWJGL tutorials and examples | Game Engine library
kandi X-RAY | lwjgl-basics Summary
kandi X-RAY | lwjgl-basics Summary
lwjgl-basics is a minimal shader-based library for 2D LWJGL sprite games. It provides essential utilities for handling textures, shaders, and sprite rendering. For a large game project, a platform like LibGDX may be more suitable. The source code is hosted on GitHub.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Creates a program with the specified attributes
- Fetch the attributes
- Fetch all available uniforms from the program
- Parses the specified font file
- Parse a line
- Compiles a shader from the given source
- Convert a shader type to a string
- Sets a projection matrix to a projection matrix
- Bind to all vertices
- Starts the rendering
- Disposes this FBO
- Sets the pixel data to the given array
- Binds the FBO buffer
- Returns true if an active attribute exists
lwjgl-basics Key Features
lwjgl-basics Examples and Code Snippets
Community Discussions
Trending Discussions on lwjgl-basics
QUESTION
I'm using libgdx and want to make a common Gaussian blur post-processing effect. Following this guide I faced some issues with texture filtering. Here the images:
actual image:
blurred with radius = 1:
blurred with radius = 5:
In the simplest case, I just have a transparent frame buffer object with some objects rendered to it. Then I need to apply some shader effects to this, basically only blur and then render the result to the screen. I also want to adjust the blur radius, but if I set the radius to more than 1 it becomes looking very rough. Guess it should be used with some linear filtering, but it isn't here. So I just need the same effect applied with a soft blur and configurable radius, maybe some other shader-sided options. And I've also tried to explicitly assign Linear filtering to FBO textures, which doesn't change anything.
Fragment shader:
...ANSWER
Answered 2020-Nov-16 at 09:30From what I see you are not doing Gaussian blur at all...
Gaussian blur on image is convolution between image and Gaussian weighted matrix of resolution 1+2*r
where r
is radius of your blur. So outputted color should be weighted sum of all pixels up to distance of r
from the targeted pixel.
What you are doing is just weighted sum of 9 pixels regardless of the radius that is wrong (in my optinion) as you should sum up ~6.28*r*r
pixels instead. So I would expect 2 nested for loops instead ...
Here a small GLSL example I just busted together:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install lwjgl-basics
You can use lwjgl-basics like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the lwjgl-basics component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page