Major Member
|
引用:
Originally posted by Artx1
基本上, 這個事件對Valve本身的損失最大, 因為Valve本來是計畫在HL2之後,
販賣這套引擎的, 目前看來是別想賣了....
而且還外加洩漏了一些簽約的工具廠商的資料, 可以想見的是那些公司應該也會來索賠....
Valve現在動用社群的力量開始找兇手, 不過看來是只有亡羊補牢的效果了.
至於程式碼是不是有針對NV3x進行不當的負擔增大, 覺得是要慢慢K了.
ex:
代碼:
#ifdef NV3X
HALF4 EnvReflect( sampler envmapSampler,
sampler normalizeSampler,
HALF3 normal,
float3 eye,
HALF2 fresnelScaleBias )
{
HALF3 normEye = texCUBE( normalizeSampler, eye );
HALF fresnel = Fresnel( normal, normEye, fresnelScaleBias );
HALF3 reflect = CalcReflectionVectorUnnormalized( normal, eye );
return texCUBE( envmapSampler, reflect );
}
#else // NV3X
HALF4 EnvReflect( sampler envmapSampler,
HALF3 normal,
HALF3 eye,
HALF2 fresnelScaleBias )
{
eye = normalize( eye );
HALF fresnel = Fresnel( normal, eye, fresnelScaleBias );
HALF3 reflect = CalcReflectionVectorUnnormalized( normal, eye );
return texCUBE( envmapSampler, reflect ) * fresnel;
}
#endif
目前看來, for NV3x的那些空跑似乎是頗有問題....
本來NV3x的那部份最後應該也是
return texCUBE( envmapSampler, reflect ) * fresnel
才對.... 不然那fresnel不就變成白算了嗎. :∼
(fresnel有丟到別的地方嗎?)
|
程式碼還要 compile 成 shader code
那些累贅的程式碼經最佳化後不會出現在最後的 shader code
除非 Valve 用了不佳的 compiler
nv 的 fresnel term 也許效能不佳
所以被捨棄了
shader code detection 可是 nv 專長
別忘了
|