Jump to content

  • Log In with Google      Sign In   
  • Create Account

Prune

Member Since 07 Mar 2007
Offline Last Active Dec 12 2014 03:29 PM

#5156078 Can I bind different ranges of the same buffer object to different binding po...

Posted by Prune on 26 May 2014 - 01:27 PM

Hmm the documentation for glBindBufferRange() states that the target must be GL_TRANSFORM_FEEDBACK_BUFFER or GL_UNIFORM_BUFFER. And in ARB_draw_indirect I see in the revision history "Remove BindBufferRange/Base from commands for which DRAW_INDIRECT_BUFFER is a valid target". So I guess not.




#5151024 Global illumination techniques

Posted by Prune on 02 May 2014 - 05:51 PM

Touched a nerve, did I? LOL (BTW, it's a 4chan meme--who the fuck reads reddit?)

 

I'm not defensive, since I'm not associated with the authors and I don't have anything invested in it. I am, however, planning to accelerate it with OptiX, as I've used OptiX with OpenGL before (for rendering reflections and refractions in an otherwise rasterized scene), and it seems a perfect fit. Your comment on glossy indirect is a red herring; the cow object in fig.6 is glossy. Same for photon volume clipping--you'd have to be the closer to the surface than the volume radius:

simply restrict the viewpoint from approaching the surface closer than the photon volume minor radius, which is typically 0.1m for the human-scale scenes in our experiments. We note that many applications already impose a similar restriction to avoid clipping nearby geometry or penetrating it with a view model.

Are you seriously objecting to that solution?




#5150999 Global illumination techniques

Posted by Prune on 02 May 2014 - 03:59 PM

 

Voxel cone-tracing was mentioned as the state-of-the-art for RTGI, but I think real-time photon mapping with GPU-based initial bounce and final gather (by rasterizing volumes representing the photons) is still the state-of-the-art, even though it's now four years old: http://graphics.cs.williams.edu/papers/PhotonHPG09/

I especially like that you don't have to voxelize your scene. In a modern implementation, you'd use NVIDIA's OptiX to do the incoherent phase of the photon tracing on the GPU as well, instead of CPU like in the original paper.

 

RTGI has plenty of issue, e.g. when the camera clips the photon volumes, instability when lights move around, limited to diffuse GI.

 

Did you even look at the paper I linked to? It is not limited to diffuse GI; it handles specular and any other BSDF, including in the intermediate bounces (as a cursory glance at the images in the paper would have shown you that--what's more obvious non-diffuse GI than caustics?)




#5139095 Depth pre-pass: does OpenGL still execute fragment shader if depth not writte...

Posted by Prune on 14 March 2014 - 05:10 PM

First off, you ask "if depth not written" - and then you use glDepthMask(GL_TRUE) - that's oxymoronic.

 

Secondly, for a final absolute determination... you can use a query object for samples passed.

I mean not written explicitly in the fragment shader by assigning to gl_FragDepth.




#5139094 Depth pre-pass: does OpenGL still execute fragment shader if depth not writte...

Posted by Prune on 14 March 2014 - 05:07 PM

Kind of a useless question.

If it does execute: then keep your fragment shader as gl_FragColor = vec4(0,0,0,0);  OR you may not even need it. leaving a blank main() that returns immediately even though it is executed.

If it doesn't execute for GL_NONE: then keep the same stripped down fragment shader. It just wont run.....

I don't believe you can have a shader object without a vertex + pixel shader. Not sure though.

 

Maybe you should read the question again, because you seem to have answered a different one.

 

> If it does execute...

> If it doesn't execute

 

That presumes the answer--which, if I knew, I wouldn't have asked here in the very title of my question, now, would have I? Do you have a problem with reading comprehension?

 

I specifically asked about efficiency. I need to know which case it is, so I can determine whether to do the work of making additional shader programs that have the no fragment shader (or have a main() that doesn't do anything--which of those latter two is NOT my question and obviously I can easily check). What you wrote, instead, was what to do in either case--which I already knew. GG




#5139064 Depth pre-pass: does OpenGL still execute fragment shader if depth not writte...

Posted by Prune on 14 March 2014 - 02:27 PM

I set up for depth pre-pass as follows:

glEnable(GL_DEPTH_TEST);
glDepthMask(GL_TRUE);
glDepthFunc(GL_LESS);
glClear(GL_DEPTH_BUFFER_BIT);
glFramebufferDrawBufferEXT(id, GL_NONE); // id is currently bound framebuffer object
glColorMaski(0, GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE);

I'm not explicitly writing depth in the fragment shader. Should I then have a version of my shader program that has only a vertex shader and no fragment shader? I ask for efficiency reasons, since I don't know whether OpenGL can figure out from either the GL_NONE draw buffer or false color mask that it doesn't need to run the fragment shader. The downside of doing a separate shader program for the depth pre-pass is that I'd have to do it for every shader program that has a different vertex shader.




#5121064 Which C++ cast to use for T * to T *__restrict?

Posted by Prune on 03 January 2014 - 10:49 PM

For example, I have a char * and I want to cast it to a char *__restrict.

Visual C++ 2012 seems to be OK with either static_cast or const_cast, and doesn't require a reinterpret_cast, but which one is really correct to use?




#5113602 Histogram: logarithmic binning in O(1)?

Posted by Prune on 01 December 2013 - 06:28 PM

Thanks a lot!




#5111991 Reload

Posted by Prune on 25 November 2013 - 06:50 PM

#define RELOAD(X, Y, ...) { X.~Y(); new (&X) Y(__VA_ARGS__); }



#4910568 Linux shared memory question

Posted by Prune on 07 February 2012 - 11:46 AM

Managed to answer my own question. Can't close both the name and the fd as the other process needs one or the other in order to open the shmem.


#4895105 Which Country Should I Move To?

Posted by Prune on 18 December 2011 - 04:24 PM

Posted by someone on a games development site?

In regards to the truth-value of any statements I've made, it matters not an iota where it was posted and by whom it was posted.


#4894951 Which Country Should I Move To?

Posted by Prune on 18 December 2011 - 12:32 AM

Small piece of advice: being correct is not enough in such discussions. If you want to be taken seriously, you also have to make sure that the out-of-band signals you're sending are good. For example: don't sound condescending or offensive. "Huh?" is a bad way to start your comment. It is never a good way to start if your ultimate goal is to convince the other person (or, more likely, some bystanders).

The problem with having such a position is that a character flaw should never get in the way of an argument; this is especially the case when I am not relying on my reputation to convince people: that is why I included a number of references in my post.

Another point is that your answer could be tailored better to the discussion at hand. Ravyne's belief - as far as I understood - was that it would be impossible to sustain US social programs without raising taxes. To this one could reply that, in fact, a government deficit is a good thing because it provides much needed stimulus to the economy.

The deficit comment is also something Krugman would say, and he is not an MMTer. So such a statement is not a sufficient differentiation factor, and so I went into more detail.

That way, your contribution to the discussion becomes more useful, and everybody benefits from that. It's an uphill battle to at least get everybody to read basic facts about how the monetary system works, such as the one on PragCap or the primer by Randall Wray.

Your first link leads to the second link I posted--I was being so helpful that I even saved people an extra click.

You don't help by giving off the vibe of a crazy person (though I admit it often does feel like the inmates are running the asylum).

I don't see that I am giving off such a vibe. Are you sure you're not projecting?


#4893008 Which Country Should I Move To?

Posted by Prune on 11 December 2011 - 11:12 PM

I don't believe that the American system is sustainable for all the programs we have.

Huh?
Taxation is not what pays for government spending, because under a fiat system the government is not revenue constrained. It can create money ex nihilo on an as-needed basis. It doesn't need to borrow that money from the public or abroad by issuing debt instruments either--that's purely a political choice. And saying that inflation is the reason this is not done is also false, because inflation depends more on aggregate demand. Macroeconomic debt between treasury and central bank is not real debt in the sense people understand it--it's an accounting fiction and it doesn't have to be "repaid". This misunderstanding of the nature of debt in macroeconomic terms is a good example of the most basic economic fallacy, the fallacy of composition.
http://bilbo.economi...t/blog/?p=11218
http://papers.ssrn.c...ract_id=1905625
It is exactly such misunderstandings by the politicos of some very fundamental aspects of how modern monetary systems actually work that have a lot to do with why the economic crisis was poorly dealt with, and even allowed to happen (the MMT people predicted what happened very well, and also the weak effects of remedial measures such as "quantitative easing"). People still seem to, by inertia, think of money in the outdated tradition of gold-based currency that Nixon nixed decades ago. This is also why we still have persistent myths such as that banks create money by the money multiplier in fractional reserve systems (false because money loaned out by banks (assets) are deposited at other banks (liabilities)--you have to look at the system in totality--and this nets to zero; banks loan out as much as possible during the day and, if needed, borrow on the overnight market to refill their reserves at the central bank, which means they are NOT reserve constrained in practice--another common myth; banks are constrained by the capital/asset ratio instead, and that's what's critical to be enforced).
http://pragcap.com/y...plier-is-a-myth
http://bilbo.economi...et/blog/?p=1623
Also relevant:
http://moslereconomi...er-commodities/
http://www.moslereco...t-Fullwiler.pdf

I actually went to talk to some of the Occupiers in San Francisco on MMT topics and almost got mobbed by Ron Paul supporters. WTF? Ron Paul is as Randian as the most extreme right wingers and I was surprised to see something so Tea-partyesque in the Occupy movement. Fail! Things will never improve as long as people refuse to properly educate themselves and instead pull out opinions out of their asses just because it lines up with their emotional commitment to irrational ideology.

On the positive side, after being quite vocal on Slashdot about MMT under articles which generate discussion on economics and monetary policy, I've noticed several other posters pick up the torch and start correcting the usual misconceptions by referencing MMT. The downside is, nerds have little influence among the circles where it would make a difference.


#4892463 Which Country Should I Move To?

Posted by Prune on 10 December 2011 - 02:52 AM

Canada is not a terrible choice. taxes are high

What's that about taxes?

Top personal income tax bracket in Canada: 29% (over $128,800); comparable tax bracket in US: 28% (between $83,600 and $174,400)
So it seems a whole whopping 1% percent higher than the US, right? Now hold on a second... what about above $174,400 for the US?
33%--up to $379,150. And then, 35%. Canada at those levels? Still 29%.

But perchance you were referring to corporate tax rates?
Canada: 16.5% until January 1, 2012, then 15%. US: top bracket is 35%. Ouch!

So: fuck you for spreading disinformation.

~~~~~

The reason Canada is not a good choice is because multiculturalism is the worst possible approach, and you see it in socially failed cities such as Toronto and Vancouver. US-style melting pot is much better. For those that complain about immigrants not always integrating well in the US--you better stay out of Canada where it's 10x worse! Don't like ghettos? Toronto is turning into one, and Vancouver's downtown eastside is one of the worst slums in North America, with more junkies per square meter than anywhere I have ever seen.


#4798025 Why do people use SDL with OpenGL?

Posted by Prune on 13 April 2011 - 11:16 AM

I've played with OpenGL before but not for very long. I've noticed that the id tech engine uses SDL alongside OpenGL but I don't really understand why? DirectX 10 uses on screen quads with textures to render 2d sprites so I'm wondering why not just do that with OpenGL? I'm pretty sure playing 3d audio would still require OpenAL so why even use SDL for audio? On top of that I'm pretty sure anything else SDL does would be covered by wxWidgets or even GLFW. Why is SDL the standard?

SDL tries to be the proverbial Jack of all trades, and naturally is master of none. The best thing is to use different libraries optimized for each specific thing you need. In some cases, you can even beat the native Windows API for things such as mutexes: http://locklessinc.com/articles/keyed_events/ (also check other articles on this site for more, it's a goldmine or extreme optimization)


PARTNERS