Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


syskrank

Member Since 31 Mar 2014
Offline Last Active Today, 12:39 AM

Posts I've Made

In Topic: LibGDX Box2D libraries

21 March 2015 - 02:53 PM


You can open them with anything that supports ZIP compression to see whats inside, you'll see the .dll for windows, .so for Linux and .dylib for OSX, x86 and x86_64 versions.

Wow, didn't know that, thanks.


In Topic: The programmer's personal journey and changing tastes

20 March 2015 - 03:00 PM

You should be happy to be back at the build-something-useful-stage. Obsessing about details is like the worst, and probably not that uncommon. Like, one moment you think about programming a game, next you wanna know how that compiler and linker works, next what the OS and graphics driver does, then what that BIOS is for, what happens the very moment the computer gets turned on, how those logic gates fit together to make a CPU, what types of transistors there are and how they make a gate, how a transistor works, what chemicals there are inside, how those holes and electrons inside can jump the impassable terrain, and before you know you are reading about electric fields, subatomic particles, then quantum theory, how it relates to the theory of relativity, and finally arrive at string theory and loop quantum gravitation and wonder if there is anything more to know and how that could happen.huh.png

biggrin.png

That's called a 'scientific mindset", I suppose. The natural curiosity is the greatest thing ever. But you *really* need the way to control it, because, yup, you'll end up with a lot of knowledge but without any real significant results, just ready for the next "let-me-know-that-and-that-too" dive.


In Topic: LibGDX Box2D libraries

20 March 2015 - 02:31 PM

As far as I can remember gdx-setup adds armeabi .so for getting ARM support ( mobile devices ), and x86 for PC support.

And the .jar files you've mentioned are just java/jni wrappers on the top of the cross-compiled ( in case of ARM ) libraries. So you need to add .so (dll) file for x86 to support PC.

By the way, why not use gdx-setup?

P.S.

You may consider using gradle for managing dependencies for you. See this libgdx wiki page for details.


In Topic: Shadow Mapping in Opengl

16 March 2015 - 04:48 PM

Hi there.

Try to use ortho camera for dir light, maybe?

Your depth  shader is a bit overdo, I guess.

To write the depth it is sufficient to have something like that in your vertex shader:

#version 330 core
layout ( location = 0 ) in vec3 vertexPos;
uniform mat4 depthMVP;

void main() {
gl_Position = depthMVP * vec4( vertexPos, 1.0 );
}

Where depthMVP is : camera projection matrix * camera view matrix * camera model matrix

And then you'll have to put an empty fragment shader to finish your depth rendering.

 

So basically you bind your FBO, render your objects to the depth buffer, unbind it, then bind your main FB, bind your shadowmap from prev. stage as a 2D texture and sample distance from it. Correct me, if I'm wrong.

 

Also, is your u_lightPosition uniform in camera frag shader is in the same space as your vertex position? (which is in fact MVP matrix multiplied by vec4( a_vertexPos, 1.0 ) ) ?

You sending that uniform as light.combined. What matrix do you have there?

 

P.S.

agleed is absolutely right about the 'length()' stuff. You want the coords there, to sample from the shadowmap.


In Topic: libgdx unwanted gaps btw tiles/objects

05 September 2014 - 12:18 PM

Allright, after some digging and experiments here the complex solution:

 

To avoid gaps between objects or graphics entities in a libGDX application one should:

 

1. ensure to use floats everywhere - even for storing target screen resolution, to avoid unwanted casts and following precision loss; OpenGL is using floats for positioning, so should you;

 

2. use power-of-two textures: those with side sizes aliquot to 2^x - 32x32, 16x64, 128x256 and so on; doing so will satisfy the minimization of memory usage on GPU and will help to avoid texture coordinates distortions due to float-int casts, that may or may not happen whithin the rendering process ( whatch for your shaders and datatypes );

 

3. use POT textures even if documentation says that you can do the opposite; POTs are great;

 

4. try to use NEAREST filtering for loaded textures and texture atlases; this would protect you from wrong 'pixel mix', when OpenGL will try to average your color-filled pixels with transparent ones; however, for me that showed no significant results;

 

5. hit your artist smile.png ensure that all of your full-frame graphics elements have no transparent or half-transparent pixels at the edges - sith happens, you now smile.png

 

6.  use tight alignment and/or scale your objects just a little bit, so that they will overlay each other.

 

_____

Hope that would help someone. Cheers.


PARTNERS