라벨이 MYStudy인 게시물 표시

BRDF equation description

이미지
  The Rendering Equation and BRDFs – jackminnet (home.blog)       Eq.1 Lo = radiance output : vector4 (x,y,z,w) : 0~1 data : radiance calculation Le = emitter BRDF data : one direction only // from center Li = raidance incomming cosθ : light fluctuation calculation ( ex difference of perpendicular and slanted photon area ) dω = object area from the center Cook torrance BRDF https://prooveyourself.tistory.com/6 https://www.shadertoy.com/view/4ljcWm https://en.wikibooks.org/wiki/GLSL_Programming/Unity/Brushed_Metal Faking BRDF CookTorrance equation D(h)  : Distribution Function (분포함수) G (l,v,h) : Geometry term (기하 항) light, viewDir, halfVector F(l, h) : Fresnel (half vector) float SchlickFresnel(float4 SpecColor, float3 LightDir, float3 HalfVector) { return SpecColor + (1-SpecColor)*(pow((1 - dot( LightDir, HalfVector )), 5 )); } float k = sqr(_Roughness + 1) / 8; s.Normal = normalize(s.Normal); float NdotV = saturate(dot(s.Normal, viewDir)); float NdotL = sat...

UE simple gate function for C++

 void AARStoreInteractiveOBJ::Tick(float DeltaTime) { Super::Tick(DeltaTime); if (sLife > 0) { sLife -= DeltaTime; GEngine->AddOnScreenDebugMessage(-1, .5f, FColor::Black, FString::Printf(TEXT("ARStoreInteractive : %f"), sLife)); InteractionFunction(true, bGateIn); bGateOut = true; } else { InteractionFunction(false, bGateOut); bGateIn = true; } } void AARStoreInteractiveOBJ::CursorOn() { sLife = LifeSetup; } void AARStoreInteractiveOBJ::InteractionFunction(bool bTrue, bool bGate) { if (bGate) { if (bTrue) { InteractionIntro(); bGateIn = false; } else { InteractionOutro(); bGateOut = false; } } }

UE+ Rotate UV panning

이미지
 This post is about rotating panning using UV formula. code ____________________________________________________________________________________________ Begin Object Class=/Script/UnrealEd.MaterialGraphNode Name="MaterialGraphNode_51"    Begin Object Class=/Script/Engine.MaterialExpressionTime Name="MaterialExpressionTime_0"    End Object    Begin Object Name="MaterialExpressionTime_0"       MaterialExpressionEditorX=-6640       MaterialExpressionEditorY=1904       MaterialExpressionGuid=5A31D73144443E137AED0A8532E92F44       Material=PreviewMaterial'"/Engine/Transient.MM_Portal"'    End Object    MaterialExpression=MaterialExpressionTime'"MaterialExpressionTime_0"'    NodePosX=-6640    NodePosY=1904    NodeGuid=A0427D3C4E81C3078A7995B213E909B4    CustomProperties Pin (PinId=33D6192B4887067D4C4A5FB875E775C4,PinName="Output",PinFriendl...