Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 13 Sep 2012
Offline Last Active Yesterday, 08:46 PM

#5250492 Using gatheralpha for alpha test - problem with BC3 (DXT5) textures

Posted by TheChubu on 03 September 2015 - 05:33 PM

On the plus side, your bugged screenshot looks like a nice world map :D

#5250169 entity component system object creation

Posted by TheChubu on 01 September 2015 - 02:45 PM

XML is totally viable awfulI'm using it myself if you ever see me using it, break one of my legs.

FTFY. YAML is so much more prettier than XML that it isn't even funny anymore. Its also measurably prettier than JSON.


Look at this:

    positioning: normal
    z_offset: 0
  position: { x: 0.0, y: 0.0 }
    texture: null
    blending: normal
    tone: {r: 0, g: 0, b: 0, a: 0}
    frame: 0.0
    angle: 0.0

Versus this:



#5249788 acos ( ) in Java has gone bezierk

Posted by TheChubu on 30 August 2015 - 05:07 PM

All Java's Math trigonometry functions use radians. Keep that in mind (or read the docs, thats why they're there).

#5249278 Accurate Analytic Approximations for Real-Time Specular Area Lighting

Posted by TheChubu on 27 August 2015 - 10:47 PM

It smells like patented.

#5246935 Tinted bloom?

Posted by TheChubu on 16 August 2015 - 11:48 AM

Well I did the dir to center thingy, apparently with a normalize you get artifacts in the sampling near the center of the screen (its like as if the samples are sucked into the center). Multiplying by a small factor like L. Spiro suggested did the trick.


  float aberrationStrength = 0.02;
  vec3 toCenterTint = normalize(vec3(0.9372549, 0.26666668, 0.1));
  vec3 fromCenterTint = normalize(vec3(0.20392157, 0.0, 0.9372549));

  vec2 dirToCenter = passTexCoord - vec2(0.5, 0.5);
  vec2 offset = dirToCenter * aberrationStrength;

  vec3 tintedBloom = txMisc2.xyz; // Normal bloom texel.
  tintedBloom += texture(gbMisc2, passTexCoord + offset).xyz * toCenterTint;
  tintedBloom += texture(gbMisc2, passTexCoord - offset).xyz * fromCenterTint;


I'll prolly have to move the tint and strength parameters into the directional/sun light constant buffer so they're configurable.




#5246098 nVidia's OpenGL Core debugger for Linux

Posted by TheChubu on 12 August 2015 - 05:39 PM

nVidia released a OpenGL debugger for Linux, 4.3 core profiles and above.




...as long as you get a Gameworks dev account that is.

#5246096 Core OpenGL shader designer tools?

Posted by TheChubu on 12 August 2015 - 05:34 PM

This one is a recent project but looks pretty nice:



#5245184 Vulkan is Next-Gen OpenGL

Posted by TheChubu on 08 August 2015 - 09:50 PM

And that is news? Isn't that how OpenGL specs had always been released?

THATS the issue right there. I don't care if it always has been like that. That is the crappiest way anyone (Khronos and devs alike) could even try to rationalize the thing.


Right now I have to wait months for that "big reveal", hope I get Linux drivers from nVidia in a reasonable time, hope they support Fermi cards (Fermi D3D12 drivers aint here yet!), hope that LWJGL guy can work on Vulkan bindings in a reasonable time and then, only then I can start to work with it.


If a Khronos member reads that and thinks "THIS SOUNDS PERFECTLY FINE AND THIS IS HOW IT SHOULD BE UNLESS YOU SIGN UP FOR THE 10K USD MEMBERSHIP" they need to be slapped. Hard. With a hot iron. In the genital area.


By the time it gets released, I'll might end up too pissed off to bother with it to be honest...


EDIT: I'd totally buy that shirt tho :D

#5245034 Tinted bloom?

Posted by TheChubu on 07 August 2015 - 06:16 PM

Looks like the bloom buffer is tapped 2 times with a centered radial UV shift and each tap is tinted with a purple and orange tint and added together.
... okay, but I'm going to need to know what does "tapped 2 times" and a "centered radial UV shift" means.

#5244993 Tinted bloom?

Posted by TheChubu on 07 August 2015 - 12:01 PM

Hi! Please look at these pictures (they're from Planetside 2)





As you may notice, the glow of the sun and the bloom of the surfaces has this tint that looks to depend on the direction. I'm not terribly sure whats going on.


I added (for teh lulz) a chromatic aberration shader on the bloom pass:



But it doesn't quite looks the same. Besides, from the Planetside 2 pics you can see the tinting doesn't always follow the same direction (sometimes its reddish to blueish from right to left, sometimes from top to bottom, and so on).


#5243698 linux server vs windows server for unity mmo mobile

Posted by TheChubu on 30 July 2015 - 07:12 PM

Sounds like setting up a Linux server would be a good (and different!) learning experience for you IMHO.

#5243267 Organizing rendering code

Posted by TheChubu on 28 July 2015 - 04:11 PM

Still, worrying about the overhead of calling "renderer.update()" is kinda silly. I mean, how many calls of those are you even going to issue per frame? One? A dozen at most? I don't think you could even measure that kind of overhead properly.


In any case, making "pass(objects)" a method of the render manager sounds like a bad idea to me. You'll end up with a bunch of specialized methods like OGLManager->ShadowPass(objects), D3DManager->ShadowPass(objects), OGLManager->GeometryPass(objects) and so on.


IMO the pass itself should be an object, not a method. You got your render manager, it has a list of passes to run. So it iterates over each pass, executing the "render" method of each of them Pass knows what state to setup, what shaders to run, and the way you can handle the "object" list to draw can vary (make it part of the pass object, make it external managed by the render manager, etc).


Maybe that way the render manager doesn't even needs to be API specific, just the pass objects themselves.


Thats the bucketing way of drawing things. You essentially got buckets of objects that go into particular passes for drawing. Another popular way of drawing is using keys to sort and draw, each key has the state it needs to be executed packed in it. And there are probably combinations of both principles (bucketing and render-key based sorting).

#5243186 Dropbox + TortoiseSVN; Where is the advantage? (New to SC)

Posted by TheChubu on 28 July 2015 - 09:35 AM

I understand Tortoise could perhaps help revert changed files, or hold back files you don't want to update yet. But at the moment I'm not entirely sure where the true advantage lies, using Dropbox and TTSVN together.
Show changes compared to other revisions, "blame" a particular line changed to some specific commit, revert a file, an entire folder, the entire project, have different branches dealing with development of different features (although SVN isn't the best thing to do that), and commit messages since they're a good source of documentation if you do them properly.

#5242817 Who wants to see a C replacement?

Posted by TheChubu on 26 July 2015 - 02:19 PM

You do realize that you don't HAVE to use Visual Studio's default file filters structure, right? ;)
Well turns out I'm on linux and browsing repositories through various web based viewers (GitHub, some Mercurial, some SVN). If I didn't had to clone a 500Mb repository and setup some environment to the extent it doesn't craps itself over compiler errors (ie clone, setup QtCreator or something, spend a couple hours) just to comfortably see some files, that would be great.


Its much easier to browse other language's repos (C# if they don't go crazy with namespaces, Java simply because they can't do anything else, etc).


With an IDE is easier since you can always hit "Go to definition", and a bit of color highlighting does just fine differentiating which thing is which, and there is always the "overview" panel that gives you a pretty list of all the members of the file/class.

#5242815 can someone please explain how this code works

Posted by TheChubu on 26 July 2015 - 02:06 PM

//I didn't know you could define objects like this, can someone please explain this
Graphics g = bs.getDrawGraphics();


That's just a reference to an object.


You got the 'bs' object, call 'getDrawGraphics()' on it. That method returns a reference to an instance of Graphics, so you assign it to 'Graphics g'.


//this I don't understand
BufferStrategy bs = getBufferStrategy();


Exactly the same as before. getBufferStrategy() is called on 'this' object (its just implicit, you don't type 'this.getBufferStrategy()' but that's what its doing), returns a BufferStrategy, and assings it to 'BufferStrategy bs'.


Now in that case it seems that 'getBufferStrategy()' might return null, that is, no reference to any object. In that case it seems it creates a buffer strategy then just returns, ending the function. Probably the next time that 'render()' method is called, getBufferStrategy() will return a valid BufferStrategy instance so it won't be null.


private BufferedImage image = new BufferedImage(width,height,BufferedImage.TYPE_INT_RGB);
Thats just a constructor.


You got an object field, image, and you assign it a new BufferedImage instance.


int[] pixels = ((DataBufferInt)image.getRaster().getDataBuffer()).getData();


That one is a bit more involved. It does, 'image' getRaster(), that returns the raster object, from that raster object it does 'getDataBuffer()', and to that data buffer it casts it to a DataBufferInt reference, and from that casted data buffer it calls 'getData()'. Follow it slowly.


I think you should review a few basic concepts. Constructors, object references, method calls, static method calls, object fields, etc. You can find plenty of official Java tutorials in Oracle's site.


For example: https://docs.oracle.com/javase/tutorial/reflect/member/ctor.html (and look at the sidebar, plenty of the things you asked here are explained there).