Fixed flipped reflection and skybox on x-axis, enable anisotropy (Fixes #232)
This commit is contained in:
parent
13eed42bfb
commit
9ce827b3f3
7 changed files with 32 additions and 3 deletions
|
|
@ -80,7 +80,7 @@ public:
|
|||
{
|
||||
zoom = -4.0f;
|
||||
rotationSpeed = 0.25f;
|
||||
rotation = { -7.25f, 120.0f, 0.0f };
|
||||
rotation = { -7.25f, -120.0f, 0.0f };
|
||||
enableTextOverlay = true;
|
||||
title = "Vulkan Example - Cube map";
|
||||
}
|
||||
|
|
@ -267,11 +267,16 @@ public:
|
|||
sampler.addressModeV = sampler.addressModeU;
|
||||
sampler.addressModeW = sampler.addressModeU;
|
||||
sampler.mipLodBias = 0.0f;
|
||||
sampler.maxAnisotropy = 8.0f;
|
||||
sampler.compareOp = VK_COMPARE_OP_NEVER;
|
||||
sampler.minLod = 0.0f;
|
||||
sampler.maxLod = cubeMap.mipLevels;
|
||||
sampler.borderColor = VK_BORDER_COLOR_FLOAT_OPAQUE_WHITE;
|
||||
sampler.maxAnisotropy = 1.0f;
|
||||
if (vulkanDevice->features.samplerAnisotropy)
|
||||
{
|
||||
sampler.maxAnisotropy = vulkanDevice->properties.limits.maxSamplerAnisotropy;
|
||||
sampler.anisotropyEnable = VK_TRUE;
|
||||
}
|
||||
VK_CHECK_RESULT(vkCreateSampler(device, &sampler, nullptr, &cubeMap.sampler));
|
||||
|
||||
// Create image view
|
||||
|
|
|
|||
|
|
@ -89,6 +89,12 @@
|
|||
<ClInclude Include="..\base\vulkanexamplebase.h" />
|
||||
<ClInclude Include="..\base\vulkantools.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="..\data\shaders\cubemap\reflect.frag" />
|
||||
<None Include="..\data\shaders\cubemap\reflect.vert" />
|
||||
<None Include="..\data\shaders\cubemap\skybox.frag" />
|
||||
<None Include="..\data\shaders\cubemap\skybox.vert" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
|
|
|
|||
|
|
@ -13,6 +13,9 @@
|
|||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Shaders">
|
||||
<UniqueIdentifier>{3adf072b-32a9-412a-8eb5-5329a601df1a}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\base\vulkandebug.cpp">
|
||||
|
|
@ -39,4 +42,18 @@
|
|||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="..\data\shaders\cubemap\reflect.frag">
|
||||
<Filter>Shaders</Filter>
|
||||
</None>
|
||||
<None Include="..\data\shaders\cubemap\reflect.vert">
|
||||
<Filter>Shaders</Filter>
|
||||
</None>
|
||||
<None Include="..\data\shaders\cubemap\skybox.frag">
|
||||
<Filter>Shaders</Filter>
|
||||
</None>
|
||||
<None Include="..\data\shaders\cubemap\skybox.vert">
|
||||
<Filter>Shaders</Filter>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
Loading…
Add table
Add a link
Reference in a new issue