Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

169 Neutral

About iGrfx

  • Rank

Personal Information

  • Role
    Technical Director
  • Interests

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Thank you so much Vilem! Now I more understand the POM😀
  2. The algorithm of POM link:https://developer.amd.com/wordpress/media/2012/10/Tatarchuk-POM.pdf This PPT got the neat effect at the oblique angle: What I got more like a relief mapping (maxstep 32, minstep 8): here are some of my code snip: int NumberSteps = (int)lerp(MaxSteps, MinSteps, dot(ViewWS, NormalWS)); float CurrHeight = 0.0; float StepSize = 1.0 / (float)NumberSteps; float PrevHeight = 1.0; float NextHeight = 0.0; int StepIndex = 0; bool Condition = true; float2 TexOffsetPerStep = StepSize * ParallaxOffsetTS; float2 TexCurrentOffset = TexCoord; float CurrentBound = 1.0; float ParallaxAmount = 0.0; float2 Pt1 = 0; float2 Pt2 = 0; float2 TexOffset2 = 0; while(StepIndex < NumberSteps) { TexCurrentOffset -= TexOffsetPerStep; CurrHeight = Texture2DSampleGrad(BumpMap,BumpMapSampler, TexCurrentOffset, InDDX, InDDY).x; CurrentBound -= StepSize; if(CurrHeight > CurrentBound) { Pt1 = float2(CurrentBound, CurrHeight); Pt2 = float2(CurrentBound+StepSize, PrevHeight); TexOffset2 = TexCurrentOffset - TexOffsetPerStep; StepIndex = NumberSteps + 1; } else { StepIndex++; PrevHeight = CurrHeight; } } float Delta2 = Pt2.x - Pt2.y; float Delta1 = Pt1.x - Pt1.y; ParallaxAmount = (Pt1.x*Delta2 - Pt2.x*Delta1)/(Delta2 - Delta1); float2 ParallaxOffset = ParallaxOffsetTS * (1.0 - ParallaxAmount); float2 TexSampleBase = TexCoord - ParallaxOffset; TexSampleCoord = TexSampleBase; Is something I missing here? Thanks a lot!
  3. Thanks Vilem! So the GPU using Homogenous Clipping while some software raster using Sutherland-Hodgman?
  4. A matrix can "compress" info such as "Transform", "Scale", "Rotation", "Projection" into it. Actually, a matrix contains information which modified a 3D object along with its base axis. It is just a math tool like "Sine" or "Cosine" when you calculate angles in triangles.
  5. I've learned that the triangle clipping in the rasterization process usually using Sutherland–Hodgman algorithm. I also found an algorithm called "Guard-band". I'm writing a software raster so I want to know what technical the GPU use, I want to implement it for study. Thanks! updated: what's the more proper triangulate algorithm?
  6. In this paper:http://fabiensanglard.net/polygon_codec/clippingdocument/Clipping.pdf I can't deduce these formulas which about frustum planes normal, can anyone give me some tips? etc:top normal vector < 0, − cos(a/2) , − sin(a/2)> Thanks!
  7. I Use D3DQUERYTYPE_TIMESTAMPFREQ to query GPU Frequency. On my GTX960 PC, the data I got is 100000000. I have test it on other PC which belong to my mates, the Data Still 100000000. I have try the QuerySample from NV and the result is same. What's the right way to use D3DQUERYTYPE_TIMESTAMPFREQ ? Thanks!
  8. iGrfx

    Shaders: How Do They Work?

    nice work!
  9. Hi, recently i worte my own implements of quadtree, but i encountered some bug in my algrithm. I found it difficult to debug the bug because the algrithm and data structure is complex than others. I wanna known how to debuging in this situation if you were me? Thanks advance!
  10. So if i don't use msaa(otherwise , mass count =1),and i use sample mask:0xfffffffe or 0x0, the render target will never be drawn by GPU? this seems strange, if i use 4x MSAA, what reason make me use just sample first 3?
  11. I had read the msdn http://msdn.microsoft.com/en-us/library/windows/desktop/ff476462(v=vs.85).aspx I still do not understand the mean of SampleMask. Does the MultiSampleMask determin which texture sampler to use? Or releative to MSAA?   thanks in advance!
  12. thanks a lot, now i know more about light.
  13. here are some code came from SDK, i didn't found any lighting calc here, but i can see the object.I remeber that in dx9 if i don't set the light state or enable it with shader, i just saw a black screen. any one could explain it?Thanks! float4 PS( PS_INPUT input) : SV_Target { return txDiffuse.Sample( samLinear, input.Tex )* vMeshColor; }
  14. [float]\ [float] \ b [float] / 0 <----- [font="Consolas"]matrix View 4[float]x4[float][/font] [float]/ [float]\ [float] \ b [float] / 1 [float]/ [float]\ [float] \ b [float] / 2 [float]/ look the pic, if i use view to fill b0, obviously it even occupy not b0 and b1,b2, the space still not enough...
  15. but a Matrix could be 128*4 , am i right? so how can you set a container which only can hold 4 floats to store a matrix which cap is 4X4 floats? plz~
  • Advertisement

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!