Minetest 5.10.0-dev
 
Loading...
Searching...
No Matches
shadowsScreenQuad.h
Go to the documentation of this file.
1/*
2Minetest
3Copyright (C) 2021 Liso <anlismon@gmail.com>
4
5This program is free software; you can redistribute it and/or modify
6it under the terms of the GNU Lesser General Public License as published by
7the Free Software Foundation; either version 2.1 of the License, or
8(at your option) any later version.
9
10This program is distributed in the hope that it will be useful,
11but WITHOUT ANY WARRANTY; without even the implied warranty of
12MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13GNU Lesser General Public License for more details.
14
15You should have received a copy of the GNU Lesser General Public License along
16with this program; if not, write to the Free Software Foundation, Inc.,
1751 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18*/
19
20#pragma once
22#include <IMaterialRendererServices.h>
23#include <IShaderConstantSetCallBack.h>
24#include "client/shader.h"
25
27{
28public:
30
31 void render(video::IVideoDriver *driver);
32 video::SMaterial &getMaterial() { return Material; }
33
34private:
35 video::S3DVertex Vertices[6];
36 video::SMaterial Material;
37};
38
39class shadowScreenQuadCB : public video::IShaderConstantSetCallBack
40{
41public:
42 virtual void OnSetConstants(video::IMaterialRendererServices *services,
43 s32 userData);
44private:
47 m_sm_client_map_trans_setting{"ShadowMapClientMapTraslucent"};
49 m_sm_dynamic_sampler_setting{"ShadowMapSamplerdynamic"};
50};
Definition shader.h:161
Definition shadowsScreenQuad.h:40
CachedPixelShaderSetting< s32 > m_sm_dynamic_sampler_setting
Definition shadowsScreenQuad.h:49
CachedPixelShaderSetting< s32 > m_sm_client_map_setting
Definition shadowsScreenQuad.h:45
virtual void OnSetConstants(video::IMaterialRendererServices *services, s32 userData)
Definition shadowsScreenQuad.cpp:50
CachedPixelShaderSetting< s32 > m_sm_client_map_trans_setting
Definition shadowsScreenQuad.h:47
Definition shadowsScreenQuad.h:27
void render(video::IVideoDriver *driver)
Definition shadowsScreenQuad.cpp:42
video::SMaterial Material
Definition shadowsScreenQuad.h:36
video::S3DVertex Vertices[6]
Definition shadowsScreenQuad.h:35
shadowScreenQuad()
Definition shadowsScreenQuad.cpp:23
video::SMaterial & getMaterial()
Definition shadowsScreenQuad.h:32