# iGrfx

Member

27

169 Neutral

• Rank
Member

## Personal Information

• Role
Technical Director
• Interests
Programming

## Recent Profile Visitors

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

1. ## POM still have artifact at oblique angle

Thank you so much Vilem! Now I more understand the POMðŸ˜€
2. ## 3D POM still have artifact at oblique angle

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. ## What's the real tech behind the GPU triangles Clipping

Thanks Vilem! So the GPU using Homogenous Clipping while some software raster using Sutherland-Hodgman?
4. ## why we use matrix and only multiplication as operator in transforms?

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. ## 3D What's the real tech behind the GPU triangles Clipping

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. ## Frustum Normal Formula Derivation Help

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. ## D3DQUERYTYPE_TIMESTAMPFREQ Always GetData equal to 0.1GHz

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!

nice work!
9. ## How to debug the complex data structure and algrithms such like quadtree, BSP, octree?

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. ## what's the mean in func [OMSetBlendState] SampleMask

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. ## what's the mean in func [OMSetBlendState] SampleMask

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. ## if i use a texture, dx10 will automatically illuminate it?

thanks a lot, now i know more about light.
13. ## if i use a texture, dx10 will automatically illuminate it?

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. ## i'm confusing with with dx11 shader

[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. ## i'm confusing with with dx11 shader

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~