Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 13 Sep 2012
Offline Last Active Yesterday, 10:22 PM

#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).

#5242809 Who wants to see a C replacement?

Posted by TheChubu on 26 July 2015 - 01:48 PM

Am I the only one who actually likes header files? I love having a nice small interface in one file, and then the actually code tucked away in another. When I have to use C# I always miss my header files...
I hate it when I am navigating some project (mostly open source 3D stuff) that has some file i want to see, 8 folders deep, and I notice that something is being used but not declared in it, and I need to navigate 8 folders up, then 8 folders down in the "includes" folder to get the header and see it there, then have the two files open next to each other to make sense out of the whole thing.


Nevermind that the things that people decide to put in the header and and/or the body always end up very arbitrarily decided on-the-spot things.

#5242782 Who wants to see a C replacement?

Posted by TheChubu on 26 July 2015 - 11:27 AM

think a pretty good indication of that fact is that the only languages on the planet with the notion of separate header files are C, C++ and COBOL, of all things. Hardly role-models for modern language design...

 And Ada! :D

#5240539 Help me to clear up my confusion about OpenGL

Posted by TheChubu on 15 July 2015 - 11:46 AM

What about Vulkan? Is it worth learning OpenGL right now? When is Vulkan coming out? Will it differ much from OpenGL? I read that it will be even more low level than OpenGL? Or would it be smarter to wait for it instead of deep diving into OpenGL right now?
There is a big initial learning curve for 3D, a big important chunk of it is API agnostic, this is linear algebra theory, rendering pipeline, etc. You'll still be using matrices in Vulkan, OpenGL or D3D, you'll still be rasterizing polygons in Vulkan, OpenGL or D3D, and so on.


There is no reason to artificially delay your learning, you'll be learning a lot for a lot of time, so you might aswell get started as soon as you can :)


In any case, the only good reason to start at that level is because you enjoy a lot that kind of coding or because its literally your job, if you don't feel like its your thing, you could always grab a framework/engine that does those things for you. It takes a lot of time to learn that stuff, so no problem if you feel you'd enjoy more coding something else.


As for how to make sure you're reading/using "modern" features, simply avoid anything that uses a "compatibility" profile. If they don't start with a "core" profile in OpenGL 3 or 4, skip it.


I dont care how easy is to draw a fullscreen triangle in OpenGL 1.1, that shit should die already.