mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-03 00:03:50 +00:00
Add player water ripples and separate 1x water pass for MSAA compatibility
Player interaction ripples: vertex shader adds radial damped-sine displacement centered on player position, fragment shader adds matching normal perturbation for specular highlights. Player XY packed into shadowParams.zw, ripple strength into fogParams.w. Separate 1x render pass for water when MSAA is active to avoid MSAA-induced darkening — water renders after main pass resolves, using the resolved swapchain image and depth resolve target. Water 1x framebuffers rebuilt on swapchain recreate (window resize).
This commit is contained in:
parent
67e63653a4
commit
03a62526e1
11 changed files with 1306 additions and 115 deletions
|
|
@ -64,6 +64,7 @@ public:
|
|||
|
||||
// Multisampling
|
||||
PipelineBuilder& setMultisample(VkSampleCountFlagBits samples);
|
||||
PipelineBuilder& setAlphaToCoverage(bool enable);
|
||||
|
||||
// Pipeline layout
|
||||
PipelineBuilder& setLayout(VkPipelineLayout layout);
|
||||
|
|
@ -80,6 +81,7 @@ public:
|
|||
// Common blend states
|
||||
static VkPipelineColorBlendAttachmentState blendDisabled();
|
||||
static VkPipelineColorBlendAttachmentState blendAlpha();
|
||||
static VkPipelineColorBlendAttachmentState blendPremultiplied();
|
||||
static VkPipelineColorBlendAttachmentState blendAdditive();
|
||||
|
||||
private:
|
||||
|
|
@ -98,6 +100,7 @@ private:
|
|||
float depthBiasConstant_ = 0.0f;
|
||||
float depthBiasSlope_ = 0.0f;
|
||||
VkSampleCountFlagBits msaaSamples_ = VK_SAMPLE_COUNT_1_BIT;
|
||||
bool alphaToCoverage_ = false;
|
||||
std::vector<VkPipelineColorBlendAttachmentState> colorBlendAttachments_;
|
||||
VkPipelineLayout pipelineLayout_ = VK_NULL_HANDLE;
|
||||
VkRenderPass renderPass_ = VK_NULL_HANDLE;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue