Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

529 Good

About loreStefani

  • Rank

Personal Information

  • Role
  • Interests


  • Github
  1. loreStefani

    3D Orthographic weirdness

    Have you changed the matrix layout in the shader? Otherwise the default is column-major and you are supplying your data with a row-major layout. Pass true to the third parameter of glUniformMatrix4fv. One more thing: the camera matrix is supposed to change the coordinate space from world to camera space, so it is the inverse of the transform that goes from camera to world space. For a pure translation, the latter consists of a translation to the camera position. Therefore your second implementation is correct but you don't have to reverse the matrix multiplication order!
  2. Maybe I'm missing something or maybe it's just a typo but doesn't the modelview transform from local space to view space? Since the reflection vector is in world space, shouldn't you use the view and then the projection + viewport?
  3. Great article. There is only one thing I'd suggest to elaborate on. I can think of other two reasons why the clipping is performed in clip space: 1 - computation of vertex attributes for generated vertices can be done by simple lerping 2 - you avoid external segment to show up. You can read about this on the great paper by Blinn: https://www.microsoft.com/en-us/research/publication/clipping-using-homogeneous-coordinates/
  4. Yes, you can linearly interpolate in homogeneous clip space since the MVP is a linear transformation in 4d. Unfortunately I can't think of a better reference than my own software rasterizer but I'm sure googling would be useful as it was for myself: https://github.com/loreStefani/SoftRP/blob/master/SoftRP/SHClipper.cpp
  5. Does this mean that submitting command lists with dependencies between each other, in a single batch, is not reliable?
  6. Hi, you can find the derivation here: http://blog.selfshadow.com/publications/s2012-shading-course/hoffman/s2012_pbs_physics_math_notes.pdf, page 21.
  7. loreStefani

    Rise of the Tomb Raider cave exit effect

      The purpose of linear auto-exposure (linear AE) is to adjust the whole brightness level, in a wide dynamic range. It is very important at the first place because that human eye is much more sensitive to the brightness than the color/hue. The point here is: NEVER talk about tonemapping before you get some proper exposure.   In the meanwhile, the unlinear tonemapping’s purpose is to adjust the perception of your eye for color and hue, in a much more narrow dynamic range, given a specific over-all brightness level. The common standard tonemapping methods include reinard?filmic?uncharted2?aes etc. At most time, the quality of tonemapping is very subjective, and it is all about personal’s preference. Compared with AE op, the operations of dynamic range compression and contrast adjustment are often involved in tonemapping. So we often call it as an ‘unlinear’ operation. Very interesting, thank you very much!
  8. loreStefani

    Rise of the Tomb Raider cave exit effect

      You can't. You will need 'linear exposure' + 'un-linear tonemapping'. Reinhard is only a method for tonemap. Sorry I almost forgot to thank you too! Could you elaborate on the un-linear tonemapping requirement?
  9. loreStefani

    Rise of the Tomb Raider cave exit effect

    Depending on which version, yes. The basic version (which maps infinity to white) is:[font='courier new', courier, monospace]color = color/(1+color);[/font] And the version with an adjustable white point is:[font='courier new', courier, monospace]color = (color*(1+color/(white*white)))/(1+color);[/font] Either of these can be augmented to include an exposure modification right before tone-mapping, e.g.: color *= exposure; // Exposure color = (color*(1+color/(white*white)))/(1+color); // Reinhard return pow(color, 1/2.2); //linear -> sRGB approximation If modelling a real physical camera system, you'd compute the exposure multiplier from the camera's ISO, F-stop/aperture and shutter time settings. If using auto adaptation, you might use the average scene luminance to pick an exposure value that will center the image around middle grey: e.g. [font='courier new', courier, monospace]exposure = 0.18/averageLuminance;[/font] or [font='courier new', courier, monospace]exposure = 0.18/exp2( averageLog2Luminance );[/font] Or if manually tweaking your scenes, you can manually set the exposure variable to whatever you like.   However, Reinhard is a pretty unpopular tonemapping curve for games these days. Try some of these instead: http://filmicgames.com/archives/75   You will also need a bloom effect to get the over-exposed regions of the image to bleed into the darker surroundings. OK, when I said Reinhard I meant, wrongly, the auto exposure technique and the operator itself. Maybe because they are on the same paper. Better, I also learned this, thank you very much! And thank you for the link I can't wait to experiment!
  10. loreStefani

    Rise of the Tomb Raider cave exit effect

    So basically using Reinhard I could achieve the same effect? Thanks for your response.
  11. Hello everyone, A while ago I was playing Rise of the Tomb Raider and noticed a really nice effect when Lara is near a cave's exit: the environment outside lerp from very bright to the correct luminance when she is out. An example can be seen here: https://i.kinja-img.com/gawker-media/image/upload/peafu9itvcrf8iasfibd.gif I'm especially interested in the 'inside the cave' part. I'm really curious about how it can be implemented: is it a tone mapping or a bloom tweak? Or maybe neither of them? Does someone know something about it or have worked on something similar? Anything is well accepted! Thank you.
  12. loreStefani

    A Quick Guide to FMOD

  13. loreStefani

    [D3D12] FXC shader model 5.1 crash

    I don't know StructuredBuffer very well, I'm a student and I'm still learning. I will investigate in that direction then. Thank you very much for your help!
  14. loreStefani

    [D3D12] FXC shader model 5.1 crash

    Since we're here, I have another case in which the compiler fails: struct VertexOut { float4 positionH : SV_POSITION; float2 textCoord : TEXTCOORD; }; struct TextureIndex { uint index; }; ConstantBuffer<TextureIndex> textureIndex : register(b0); #define TEXTURES_COUNT 10 Texture2D<float4> textures[TEXTURES_COUNT] : register(t0); SamplerState textureSampler : register(s0); float4 main(VertexOut pin) : SV_TARGET { return textures.Sample(textureSampler, pin.textCoord); //should be textures[textureIndex.index].Sample(...) } The compiler crashes regardless any optimization setting. I understand you are in contact with the team, can you pass this too or teach me how to report a bug, please?
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!