GLuint posLength = sizeof(PointStruct) * PointCloudData.size(); correct
GLuint posLength = sizeof(PointCloudData) ; wrong
glBufferData(GL_ARRAY_BUFFER, posLength, &PointCloudData[0], GL_STATIC_DRAW);
GLuint posLength = sizeof(PointStruct) * PointCloudData.size(); correct
GLuint posLength = sizeof(PointCloudData) ; wrong
glBufferData(GL_ARRAY_BUFFER, posLength, &PointCloudData[0], GL_STATIC_DRAW);
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
bool SceneRenderer::setPerMaterialData(const CurrentWorkingData& currentData, const Material* pMaterial) { ConstantBuffer* pCB = currentData.pVars->getConstantBuffer(kPerMaterialCbName).get(); if (pCB) { pMaterial->setIntoProgramVars(currentData.pVars, pCB, "gMaterial"); } return true; } void SceneRenderer::updateVariableOffsets(const ProgramReflection* pReflector) { if (sWorldMatOffset == ConstantBuffer::kInvalidOffset) { const auto pPerMeshCbData = pReflector->getBufferDesc(kPerMeshCbName, ProgramReflection::BufferReflection::Type::Constant); if (pPerMeshCbData != nullptr) { assert(pPerMeshCbData->getVariableData("gWorldMat[0]")->isRowMajor == false); // We copy into CBs as column-major assert(pPerMeshCbData->getVariableData("gWorldInvTransposeMat[0]")->isRowMajor == false); assert(pPerMeshCbData->getVariableData("gWorldMat")->arraySize == pPerMeshCbData->getVariableData("gWorldInvTransposeMat")->arraySize); sWorldMatArraySize = pPerMeshCbData->getVariableData("gWorldMat")->arraySize; sWorldMatOffset = pPerMeshCbData->getVariableData("gWorldMat[0]")->location; sWorldInvTransposeMatOffset = pPerMeshCbData->getVariableData("gWorldInvTransposeMat[0]")->location; sMeshIdOffset = pPerMeshCbData->getVariableData("gMeshId")->location; sDrawIDOffset = pPerMeshCbData->getVariableData("gDrawId[0]")->location; } } if (sCameraDataOffset == ConstantBuffer::kInvalidOffset) { const auto pPerFrameCbData = pReflector->getBufferDesc(kPerFrameCbName, ProgramReflection::BufferReflection::Type::Constant); if (pPerFrameCbData != nullptr) { sCameraDataOffset = pPerFrameCbData->getVariableData("gCam.viewMat")->location; const auto& pCountOffset = pPerFrameCbData->getVariableData("gLightsCount"); sLightCountOffset = pCountOffset ? pCountOffset->location : ConstantBuffer::kInvalidOffset; const auto& pLightOffset = pPerFrameCbData->getVariableData("gLights[0].worldPos"); sLightArrayOffset = pLightOffset ? pLightOffset->location : ConstantBuffer::kInvalidOffset; const auto& pAmbientOffset = pPerFrameCbData->getVariableData("gAmbientLighting"); sAmbientLightOffset = pAmbientOffset ? pAmbientOffset->location : ConstantBuffer::kInvalidOffset; } } } |
D3D12_SIMULTANEOUS_RENDER_TARGET_COUNT = 8
Research:
Others:
…悲剧就是将美好的东西毁灭给人看…
newmtl mtlName # mtlName is the name of the material
Ka 1.000 1.000 1.000 #材质的阴影色(ambient color)用Ka声明。颜色用RGB定义,每条通道的值从0到1之间取。
Kd 1.000 1.000 1.000 #固有色(diffuse color)
Ks 0.000 0.000 0.000 #高光色(specular color), if black {specular color is closed}
Ns 10.000 #Use Ns to represent weighted specular color, range 0 – 1000
illum 2 #illumination mode
0. 色彩开,阴影色关
1. 色彩开,阴影色开
2. 高光开
3. 反射开,光线追踪开
4. 透明: 玻璃开 反射:光线追踪开
5. 反射:菲涅尔衍射开,光线追踪开
6. 透明:折射开 反射:菲涅尔衍射关,光线追踪开
7. 透明:折射开 反射:菲涅尔衍射开,光线追踪开
8. 反射开,光线追踪关
9. 透明: 玻璃开 反射:光线追踪关
10. 投射阴影于不可见表面
d 0.9 # dissolve? 有些用’d’实现
Tr 0.9 # 其他的用’Tr’
map_Ka lena.tga # 阴影色纹理贴图
map_Kd lena.tga # 固有色纹理贴图 (多数情况下与其阴影色纹理贴图相同)
map_Ks lena.tga # 高光色纹理贴图
map_d lena_alpha.tga # alpha通道纹理贴图
map_bump lena_bump.tga # 凹凸贴图
bump lenna_bump.tga # 也有用’bump’而非’map_Bump’标签
For textures:
.dif are for diffuse
.alpha are for transparentcy
.spec are for specular reflection
.ddn are tengent space normal maps
.BGR?
No user test
Towards Foveated Rendering for Gaze-Tracked Virtual Reality
Pre-User study: Prove the hypothesis that using temporally stable and contrast preserving foveation could improve the threshold. The detail of shading rate choice is not clear in the paper. Needs supplemental material.
Post-User study: Verify that our rendering system indeed achieves the superior image quality predicted by our perceptual target. Instead of estimating a threshold rate of foveation, we estimate the threshold size of the intermediate region between the inner (foveal) and the outer (peripheral) regions.
Adaptive Image‐Space Sampling for Gaze‐Contingent Real‐time Rendering
Foveated Real‐Time Ray Tracing for Head‐Mounted Displays
Here is the correspondance between GLSL and HLSL:
http://www.umiacs.umd.edu/~xmeng525/HLSL2GLSL_Documentation
Others functions not included in the document:
GLSL HLSL
mod fmod
mix lerp