Merge branch 'master' into properties

This commit is contained in:
Bart Cools 2014-07-01 13:55:10 +02:00
commit 4a13eebc00
128 changed files with 2564 additions and 2441 deletions

View File

@ -1,5 +1,8 @@
##TODO ##TODO
THIS IS A 2nd TEST.
THIS IS A TEST.
SuperTuxKart is looking for additional man power to make this SuperTuxKart is looking for additional man power to make this
one of the best free linux games out there :) We need (in one of the best free linux games out there :) We need (in
no particular order): no particular order):

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<stkgui> <stkgui>
<div x="5%" y="5%" width="90%" height="90%" layout="vertical-row"> <div x="5%" y="5%" width="90%" height="90%" layout="vertical-row">

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<stkgui> <stkgui>
<div x="0%" y="0%" width="100%" height="98%" layout="vertical-row" > <div x="0%" y="0%" width="100%" height="98%" layout="vertical-row" >
<div x="0" y="0" width="100%" layout="horizontal-row" height="8%"> <div x="0" y="0" width="100%" layout="horizontal-row" height="8%">
@ -36,5 +36,4 @@
</box> </box>
</div> </div>
</stkgui> </stkgui>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<stkgui> <stkgui>
<icon-button id="back" x="0" y="0" height="8%" icon="gui/back.png"/> <icon-button id="back" x="0" y="0" height="8%" icon="gui/back.png"/>
<div x="2%" y="1%" width="96%" height="99%" layout="vertical-row" > <div x="2%" y="1%" width="96%" height="99%" layout="vertical-row" >
@ -24,5 +24,4 @@
<spacer width="20" height="3%" /> <spacer width="20" height="3%" />
</div> </div>
</stkgui> </stkgui>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<stkgui> <stkgui>
<icon-button id="back" x="0" y="0" height="8%" icon="gui/back.png"/> <icon-button id="back" x="0" y="0" height="8%" icon="gui/back.png"/>
<div x="5%" y="2%" width="90%" height="96%" layout="vertical-row" > <div x="5%" y="2%" width="90%" height="96%" layout="vertical-row" >

View File

@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<stkgui> <stkgui>
<div x="2%" y="10%" width="96%" height="80%" layout="vertical-row" > <div x="2%" y="10%" width="96%" height="80%" layout="vertical-row" >
<label id="title" width="100%" text_align="center" word_wrap="true" proportion="1" /> <label id="title" width="100%" text_align="center" word_wrap="true" proportion="1" />
<spacer height="25" width="10" /> <spacer height="25" width="10" />
@ -13,7 +12,5 @@
<button id="cancel" I18N="In a 'are you sure?' dialog" text="Cancel" align="center"/> <button id="cancel" I18N="In a 'are you sure?' dialog" text="Cancel" align="center"/>
<spacer height="10" width="10" /> <spacer height="10" width="10" />
</div> </div>
</stkgui> </stkgui>

View File

@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<stkgui> <stkgui>
<div x="2%" y="10%" width="96%" height="80%" layout="vertical-row" > <div x="2%" y="10%" width="96%" height="80%" layout="vertical-row" >
<label id="title" width="100%" text_align="center" word_wrap="true" proportion="1" /> <label id="title" width="100%" text_align="center" word_wrap="true" proportion="1" />
<spacer height="25" width="10" /> <spacer height="25" width="10" />
@ -15,7 +14,5 @@
text="Cancel" align="center"/> text="Cancel" align="center"/>
<spacer height="10" width="10" /> <spacer height="10" width="10" />
</div> </div>
</stkgui> </stkgui>

View File

@ -1,6 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<stkgui> <stkgui>
<icon-button id="back" x="0" y="0" height="8%" icon="gui/back.png"/> <icon-button id="back" x="0" y="0" height="8%" icon="gui/back.png"/>
<div x="2%" y="2%" width="98%" height="96%" layout="vertical-row" > <div x="2%" y="2%" width="98%" height="96%" layout="vertical-row" >
@ -10,9 +9,6 @@
<header I18N="Title in credits screen" text="Credits" width="100%" /> <header I18N="Title in credits screen" text="Credits" width="100%" />
<box id="animated_area" width="100%" proportion="10" padding="0"> <box id="animated_area" width="100%" proportion="10" padding="0">
</box> </box>
</div> </div>
</stkgui> </stkgui>

View File

@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<stkgui> <stkgui>
<div x="2%" y="1%" width="96%" height="98%" layout="vertical-row" > <div x="2%" y="1%" width="96%" height="98%" layout="vertical-row" >
<header id="title" width="100%" height="fit" text_align="center" word_wrap="true" text="Graphics Settings" /> <header id="title" width="100%" height="fit" text_align="center" word_wrap="true" text="Graphics Settings" />
<spacer height="20" width="10" /> <spacer height="20" width="10" />
@ -186,5 +185,4 @@
<button id="close" text="Apply" align="center"/> <button id="close" text="Apply" align="center"/>
</div> </div>
</stkgui> </stkgui>

View File

@ -1,3 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<stkgui> <stkgui>
<div x="2%" y="10%" width="96%" height="80%" layout="vertical-row" > <div x="2%" y="10%" width="96%" height="80%" layout="vertical-row" >
<label id="title" width="100%"/> <label id="title" width="100%"/>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<stkgui> <stkgui>
<icon-button id="back" x="0" y="0" height="8%" icon="gui/back.png"/> <icon-button id="back" x="0" y="0" height="8%" icon="gui/back.png"/>
<div x="2%" y="1%" width="96%" height="99%" layout="vertical-row" > <div x="2%" y="1%" width="96%" height="99%" layout="vertical-row" >
@ -24,5 +24,4 @@
<spacer width="20" height="3%" /> <spacer width="20" height="3%" />
</div> </div>
</stkgui> </stkgui>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<stkgui> <stkgui>
<div x="2%" y="1%" width="96%" height="98%" layout="vertical-row" padding="10"> <div x="2%" y="1%" width="96%" height="98%" layout="vertical-row" padding="10">
<header id="selected_track" width="80%" height="30" <header id="selected_track" width="80%" height="30"
@ -50,5 +50,4 @@
</div> </div>
</div> </div>
</stkgui> </stkgui>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<stkgui> <stkgui>
<div x="2%" y="10%" width="96%" height="80%" layout="vertical-row" > <div x="2%" y="10%" width="96%" height="80%" layout="vertical-row" >
<label id="title" width="100%" text_align="center" word_wrap="true" <label id="title" width="100%" text_align="center" word_wrap="true"
@ -17,5 +17,4 @@
<spacer height="15" width="20" /> <spacer height="15" width="20" />
</div> </div>
</stkgui> </stkgui>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<stkgui> <stkgui>
<div x="2%" y="10%" width="96%" height="80%" layout="vertical-row" > <div x="2%" y="10%" width="96%" height="80%" layout="vertical-row" >
<label id="title" width="100%" text_align="center" word_wrap="true" <label id="title" width="100%" text_align="center" word_wrap="true"
@ -18,5 +18,4 @@
<spacer height="15" width="20" /> <spacer height="15" width="20" />
</div> </div>
</stkgui> </stkgui>

View File

@ -1,11 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<stkgui> <stkgui>
<div x="2%" y="2%" width="96%" height="96%" layout="vertical-row"> <div x="2%" y="2%" width="96%" height="96%" layout="vertical-row">
<spacer width="10" proportion="1"/> <spacer width="10" proportion="1"/>
<button id="continue" x="20" width="250" align="left" text="Continue"/> <button id="continue" x="20" width="250" align="left" text="Continue"/>
</div> </div>
</stkgui> </stkgui>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<stkgui> <stkgui>
<icon-button id="back" x="0" y="0" height="8%" icon="gui/back.png" /> <icon-button id="back" x="0" y="0" height="8%" icon="gui/back.png" />
<div x="2%" y="1%" width="96%" height="98%" layout="vertical-row"> <div x="2%" y="1%" width="96%" height="98%" layout="vertical-row">
@ -29,7 +29,5 @@
<icon-button id="save" width="128" height="128" icon="gui/gp_save.png" <icon-button id="save" width="128" height="128" icon="gui/gp_save.png"
I18N="Menu item" text="Save" /> I18N="Menu item" text="Save" />
</buttonbar> </buttonbar>
</div> </div>
</stkgui> </stkgui>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<stkgui> <stkgui>
<icon-button id="back" x="0" y="0" height="8%" icon="gui/back.png"/> <icon-button id="back" x="0" y="0" height="8%" icon="gui/back.png"/>
<div x="2%" y="1%" width="96%" height="98%" layout="vertical-row" > <div x="2%" y="1%" width="96%" height="98%" layout="vertical-row" >
@ -41,5 +41,4 @@
</buttonbar> </buttonbar>
</div> </div>
</stkgui> </stkgui>

View File

@ -1,3 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<stkgui> <stkgui>
<div x="2%" y="2%" width="96%" height="96%" layout="vertical-row"> <div x="2%" y="2%" width="96%" height="96%" layout="vertical-row">
<spacer width="10" proportion="1"/> <spacer width="10" proportion="1"/>

View File

@ -1,3 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<stkgui> <stkgui>
<div x="2%" y="2%" width="96%" height="96%" layout="vertical-row"> <div x="2%" y="2%" width="96%" height="96%" layout="vertical-row">
<spacer width="10" proportion="1"/> <spacer width="10" proportion="1"/>

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<stkgui> <stkgui>
<div x="1%" y="1%" width="98%" height="99%" layout="vertical-row" > <div x="1%" y="1%" width="98%" height="99%" layout="vertical-row" >
<header width="80%" <header width="80%"
@ -25,5 +25,4 @@
</div> </div>
<icon-button id="back" x="0" y="0" height="8%" icon="gui/back.png"/> <icon-button id="back" x="0" y="0" height="8%" icon="gui/back.png"/>
</stkgui> </stkgui>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<stkgui> <stkgui>
<div x="1%" y="1%" width="98%" height="99%" layout="vertical-row" > <div x="1%" y="1%" width="98%" height="99%" layout="vertical-row" >
<header width="80%" <header width="80%"
@ -25,5 +25,4 @@
</div> </div>
<icon-button id="back" x="0" y="0" height="8%" icon="gui/back.png"/> <icon-button id="back" x="0" y="0" height="8%" icon="gui/back.png"/>
</stkgui> </stkgui>

View File

@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<stkgui> <stkgui>
<div x="0" y="0" width="100%" height="100%" layout="vertical-row" > <div x="0" y="0" width="100%" height="100%" layout="vertical-row" >
<icon id="logo" align="center" proportion="5" width="100%" icon="gui/logo.png"/> <icon id="logo" align="center" proportion="5" width="100%" icon="gui/logo.png"/>
<buttonbar id="menu_toprow" proportion="3" width="90%" align="center"> <buttonbar id="menu_toprow" proportion="3" width="90%" align="center">
@ -49,9 +48,6 @@
<icon-button id="quit" width="64" height="64" icon="gui/main_quit.png" extend_label="50" <icon-button id="quit" width="64" height="64" icon="gui/main_quit.png" extend_label="50"
I18N="Main menu button" text="Quit" label_location="hover"/> I18N="Main menu button" text="Quit" label_location="hover"/>
</buttonbar> </buttonbar>
</bottombar> </bottombar>
</div> </div>
</stkgui> </stkgui>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<stkgui> <stkgui>
<div x="2%" y="5%" width="96%" height="90%" layout="vertical-row" > <div x="2%" y="5%" width="96%" height="90%" layout="vertical-row" >
<header id="title" width="96%" height="fit" text_align="center" word_wrap="true" <header id="title" width="96%" height="fit" text_align="center" word_wrap="true"
@ -40,8 +40,5 @@
<icon-button id="cancel" width="64" height="64" icon="gui/main_quit.png" <icon-button id="cancel" width="64" height="64" icon="gui/main_quit.png"
I18N="In the change password dialog" text="Close" label_location="bottom"/> I18N="In the change password dialog" text="Close" label_location="bottom"/>
</buttonbar> </buttonbar>
</div> </div>
</stkgui> </stkgui>

View File

@ -1,3 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<stkgui> <stkgui>
<div x="0" y="0" width="100%" height="100%" layout="vertical-row" > <div x="0" y="0" width="100%" height="100%" layout="vertical-row" >
@ -30,7 +31,5 @@
</div> </div>
</box> </box>
<spacer height="15" width="10"/> <spacer height="15" width="10"/>
</div> </div>
</stkgui> </stkgui>

View File

@ -1,6 +1,5 @@
<?xml version="1.0" encoding="UTF-16"?> <?xml version="1.0" encoding="UTF-8"?>
<stkgui> <stkgui>
<div x="1%" y="1%" width="98%" height="98%" layout="vertical-row" > <div x="1%" y="1%" width="98%" height="98%" layout="vertical-row" >
<header align="center" width="80%" text="Login" text_align="center"/> <header align="center" width="80%" text="Login" text_align="center"/>
@ -40,5 +39,4 @@ or collect any achievements while being online."
</div> </div>
<icon-button id="back" x="0" y="0" height="8%" icon="gui/back.png"/> <icon-button id="back" x="0" y="0" height="8%" icon="gui/back.png"/>
</stkgui> </stkgui>

View File

@ -1,3 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<stkgui> <stkgui>
<div x="0" y="0" width="100%" height="100%" layout="vertical-row" > <div x="0" y="0" width="100%" height="100%" layout="vertical-row" >
@ -47,5 +48,4 @@
</div> </div>
<icon-button id="back" x="0" y="0" height="8%" icon="gui/back.png"/> <icon-button id="back" x="0" y="0" height="8%" icon="gui/back.png"/>
</stkgui> </stkgui>

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<stkgui> <stkgui>
<div x="0" y="0" width="100%" height="100%" layout="vertical-row" > <div x="0" y="0" width="100%" height="100%" layout="vertical-row" >
<header text_align="center" width="80%" align="center" I18N="In the lobby settings screen" text="Lobby Settings"/> <header text_align="center" width="80%" align="center" I18N="In the lobby settings screen" text="Lobby Settings"/>
<spacer height="15" width="10"/> <spacer height="15" width="10"/>
<box proportion="4" width="90%" layout="vertical-row" align="center"> <box proportion="4" width="90%" layout="vertical-row" align="center">
@ -28,5 +28,4 @@
</div> </div>
<icon-button id="back" x="0" y="0" height="8%" icon="gui/back.png"/> <icon-button id="back" x="0" y="0" height="8%" icon="gui/back.png"/>
</stkgui> </stkgui>

View File

@ -1,3 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<stkgui> <stkgui>
<div x="0" y="0" width="100%" height="100%" layout="vertical-row" > <div x="0" y="0" width="100%" height="100%" layout="vertical-row" >
@ -43,5 +44,4 @@
</div> </div>
<icon-button id="back" x="0" y="0" height="8%" icon="gui/back.png"/> <icon-button id="back" x="0" y="0" height="8%" icon="gui/back.png"/>
</stkgui> </stkgui>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<stkgui> <stkgui>
<div x="2%" y="5%" width="96%" height="85%" layout="vertical-row" > <div x="2%" y="5%" width="96%" height="85%" layout="vertical-row" >
<label id="info" proportion="1" width="90%" align="center" text_align="center" word_wrap="true" text=""/> <label id="info" proportion="1" width="90%" align="center" text_align="center" word_wrap="true" text=""/>
@ -12,8 +12,5 @@
<icon-button id="cancel" width="64" height="64" icon="gui/main_quit.png" <icon-button id="cancel" width="64" height="64" icon="gui/main_quit.png"
I18N="User info dialog" text="Close" label_location="bottom"/> I18N="User info dialog" text="Close" label_location="bottom"/>
</buttonbar> </buttonbar>
</div> </div>
</stkgui> </stkgui>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<stkgui> <stkgui>
<icon-button id="back" x="0" y="0" height="8%" icon="gui/back.png"/> <icon-button id="back" x="0" y="0" height="8%" icon="gui/back.png"/>
<div x="1%" y="1%" width="98%" height="98%" layout="vertical-row" > <div x="1%" y="1%" width="98%" height="98%" layout="vertical-row" >
@ -19,5 +19,4 @@
<list id="achievements_list" x="0" y="0" width="100%" height="100%"/> <list id="achievements_list" x="0" y="0" width="100%" height="100%"/>
</box> </box>
</div> </div>
</stkgui> </stkgui>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<stkgui> <stkgui>
<icon-button id="back" x="0" y="0" height="8%" icon="gui/back.png"/> <icon-button id="back" x="0" y="0" height="8%" icon="gui/back.png"/>
<div x="1%" y="1%" width="98%" height="98%" layout="vertical-row" > <div x="1%" y="1%" width="98%" height="98%" layout="vertical-row" >
@ -31,7 +31,5 @@
</div> </div>
</box> </box>
</div> </div>
</div> </div>
</stkgui> </stkgui>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<stkgui> <stkgui>
<icon-button id="back" x="0" y="0" height="8%" icon="gui/back.png"/> <icon-button id="back" x="0" y="0" height="8%" icon="gui/back.png"/>
<div x="1%" y="1%" width="98%" height="98%" layout="vertical-row" > <div x="1%" y="1%" width="98%" height="98%" layout="vertical-row" >
@ -21,5 +21,4 @@
</div> </div>
</box> </box>
</div> </div>
</stkgui> </stkgui>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<stkgui> <stkgui>
<icon-button id="back" x="0" y="0" height="8%" icon="gui/back.png"/> <icon-button id="back" x="0" y="0" height="8%" icon="gui/back.png"/>
<div x="1%" y="1%" width="98%" height="98%" layout="vertical-row" > <div x="1%" y="1%" width="98%" height="98%" layout="vertical-row" >
@ -25,5 +25,4 @@
</div> </div>
</box> </box>
</div> </div>
</stkgui> </stkgui>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<stkgui> <stkgui>
<div x="2%" y="5%" width="96%" height="90%" layout="vertical-row" > <div x="2%" y="5%" width="96%" height="90%" layout="vertical-row" >
<header id="title" width="96%" height="fit" text_align="center" word_wrap="true" <header id="title" width="96%" height="fit" text_align="center" word_wrap="true"
@ -16,8 +16,5 @@
<icon-button id="cancel" width="64" height="64" icon="gui/green_check.png" <icon-button id="cancel" width="64" height="64" icon="gui/green_check.png"
I18N="Registration dialog" text="Close" label_location="none"/> I18N="Registration dialog" text="Close" label_location="none"/>
</buttonbar> </buttonbar>
</div> </div>
</stkgui> </stkgui>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<stkgui> <stkgui>
<div x="2%" y="5%" width="96%" height="90%" layout="vertical-row" > <div x="2%" y="5%" width="96%" height="90%" layout="vertical-row" >
<header id="title" width="96%" height="fit" text_align="center" word_wrap="true" <header id="title" width="96%" height="fit" text_align="center" word_wrap="true"
@ -40,7 +40,5 @@
<icon-button id="cancel" width="64" height="64" icon="gui/main_quit.png" <icon-button id="cancel" width="64" height="64" icon="gui/main_quit.png"
I18N="Registration dialog" text="Cancel" label_location="none"/> I18N="Registration dialog" text="Cancel" label_location="none"/>
</buttonbar> </buttonbar>
</div> </div>
</stkgui> </stkgui>

View File

@ -1,6 +1,5 @@
<?xml version="1.0" encoding="UTF-16"?> <?xml version="1.0" encoding="UTF-8"?>
<stkgui> <stkgui>
<div x="1%" y="1%" width="98%" height="98%" layout="vertical-row" > <div x="1%" y="1%" width="98%" height="98%" layout="vertical-row" >
<header align="center" width="80%" text="Create User" text_align="center" <header align="center" width="80%" text="Create User" text_align="center"
@ -78,5 +77,4 @@
</div> </div>
<icon-button id="back" x="0" y="0" height="8%" icon="gui/back.png"/> <icon-button id="back" x="0" y="0" height="8%" icon="gui/back.png"/>
</stkgui> </stkgui>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<stkgui> <stkgui>
<div x="2%" y="4%" width="96%" height="92%" layout="vertical-row" > <div x="2%" y="4%" width="96%" height="92%" layout="vertical-row" >
<header id="title" width="96%" height="fit" text_align="center" word_wrap="true" <header id="title" width="96%" height="fit" text_align="center" word_wrap="true"
@ -29,8 +29,5 @@
<icon-button id="cancel" width="64" height="64" icon="gui/main_quit.png" <icon-button id="cancel" width="64" height="64" icon="gui/main_quit.png"
I18N="Registration dialog" text="Cancel" label_location="bottom"/> I18N="Registration dialog" text="Cancel" label_location="bottom"/>
</buttonbar> </buttonbar>
</div> </div>
</stkgui> </stkgui>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<stkgui> <stkgui>
<div x="2%" y="5%" width="96%" height="85%" layout="vertical-row" > <div x="2%" y="5%" width="96%" height="85%" layout="vertical-row" >
<header id="title" width="96%" height="fit" text_align="center" word_wrap="true" <header id="title" width="96%" height="fit" text_align="center" word_wrap="true"
@ -26,8 +26,5 @@
<icon-button id="cancel" width="64" height="64" icon="gui/main_quit.png" <icon-button id="cancel" width="64" height="64" icon="gui/main_quit.png"
I18N="Login dialog" text="Cancel" label_location="bottom"/> I18N="Login dialog" text="Cancel" label_location="bottom"/>
</buttonbar> </buttonbar>
</div> </div>
</stkgui> </stkgui>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<stkgui> <stkgui>
<div x="0%" y="0%" width="100%" height="98%" layout="vertical-row" > <div x="0%" y="0%" width="100%" height="98%" layout="vertical-row" >
<div x="0" y="0" width="100%" layout="horizontal-row" height="8%"> <div x="0" y="0" width="100%" layout="horizontal-row" height="8%">
@ -11,7 +11,5 @@
<box proportion="1" width="98%" align="center" layout="vertical-row" padding="6"> <box proportion="1" width="98%" align="center" layout="vertical-row" padding="6">
<list id="server_list" x="0" y="0" width="100%" height="100%"/> <list id="server_list" x="0" y="0" width="100%" height="100%"/>
</box> </box>
</div> </div>
</stkgui> </stkgui>

View File

@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<stkgui> <stkgui>
<div x="2%" y="5%" width="96%" height="85%" layout="vertical-row" > <div x="2%" y="5%" width="96%" height="85%" layout="vertical-row" >
<header id="title" width="96%" height="fit" text_align="center" word_wrap="true" <header id="title" width="96%" height="fit" text_align="center" word_wrap="true"
I18N="User info dialog' dialog" text="User Info"/> I18N="User info dialog' dialog" text="User Info"/>
@ -34,8 +33,5 @@
<icon-button id="cancel" width="64" height="64" icon="gui/main_quit.png" <icon-button id="cancel" width="64" height="64" icon="gui/main_quit.png"
I18N="User info dialog" text="Close" label_location="bottom"/> I18N="User info dialog" text="Close" label_location="bottom"/>
</buttonbar> </buttonbar>
</div> </div>
</stkgui> </stkgui>

View File

@ -1,3 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<stkgui> <stkgui>
<icon-button id="back" x="0" y="0" height="8%" icon="gui/back.png"/> <icon-button id="back" x="0" y="0" height="8%" icon="gui/back.png"/>
@ -17,8 +18,5 @@
<box proportion="1" width="100%" align="center" layout="vertical-row" padding="6"> <box proportion="1" width="100%" align="center" layout="vertical-row" padding="6">
<list id="user_list" x="0" y="0" width="100%" height="100%"/> <list id="user_list" x="0" y="0" width="100%" height="100%"/>
</box> </box>
</div> </div>
</stkgui> </stkgui>

View File

@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<stkgui> <stkgui>
<div x="2%" y="5%" width="96%" height="90%" layout="vertical-row" > <div x="2%" y="5%" width="96%" height="90%" layout="vertical-row" >
<header id="title" width="96%" height="fit" text_align="center" word_wrap="true" <header id="title" width="96%" height="fit" text_align="center" word_wrap="true"
I18N="In the vote dialog' dialog" text="Vote"/> I18N="In the vote dialog' dialog" text="Vote"/>
@ -21,7 +20,5 @@
<icon-button id="cancel" width="64" height="64" icon="gui/main_quit.png" <icon-button id="cancel" width="64" height="64" icon="gui/main_quit.png"
I18N="Vote dialog" text="Close" label_location="none"/> I18N="Vote dialog" text="Close" label_location="none"/>
</buttonbar> </buttonbar>
</div> </div>
</stkgui> </stkgui>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<stkgui> <stkgui>
<div x="1%" y="1%" width="98%" height="98%" layout="vertical-row" > <div x="1%" y="1%" width="98%" height="98%" layout="vertical-row" >
<header text_align="center" width="80%" align="center" text="SuperTuxKart Options"/> <header text_align="center" width="80%" align="center" text="SuperTuxKart Options"/>
@ -66,5 +66,4 @@
</div> </div>
<icon-button id="back" x="0" y="0" height="8%" icon="gui/back.png"/> <icon-button id="back" x="0" y="0" height="8%" icon="gui/back.png"/>
</stkgui> </stkgui>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<stkgui> <stkgui>
<div x="1%" y="1%" width="98%" height="98%" layout="vertical-row" > <div x="1%" y="1%" width="98%" height="98%" layout="vertical-row" >
<header text_align="center" width="80%" align="center" text="SuperTuxKart Options"/> <header text_align="center" width="80%" align="center" text="SuperTuxKart Options"/>
@ -46,5 +46,4 @@
</div> </div>
<icon-button id="back" x="0" y="0" height="8%" icon="gui/back.png"/> <icon-button id="back" x="0" y="0" height="8%" icon="gui/back.png"/>
</stkgui> </stkgui>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<stkgui> <stkgui>
<div x="1%" y="1%" width="98%" height="98%" layout="vertical-row" > <div x="1%" y="1%" width="98%" height="98%" layout="vertical-row" >
<header text_align="center" width="80%" align="center" text="SuperTuxKart Options"/> <header text_align="center" width="80%" align="center" text="SuperTuxKart Options"/>
@ -36,5 +36,4 @@
</div> </div>
<icon-button id="back" x="0" y="0" height="8%" icon="gui/back.png"/> <icon-button id="back" x="0" y="0" height="8%" icon="gui/back.png"/>
</stkgui> </stkgui>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<stkgui> <stkgui>
<div x="1%" y="1%" width="98%" height="98%" layout="vertical-row" > <div x="1%" y="1%" width="98%" height="98%" layout="vertical-row" >
<header text_align="center" width="80%" align="center" text="SuperTuxKart Options"/> <header text_align="center" width="80%" align="center" text="SuperTuxKart Options"/>
@ -48,5 +48,4 @@
</div> </div>
<icon-button id="back" x="0" y="0" height="8%" icon="gui/back.png"/> <icon-button id="back" x="0" y="0" height="8%" icon="gui/back.png"/>
</stkgui> </stkgui>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<stkgui> <stkgui>
<div x="1%" y="1%" width="98%" height="98%" layout="vertical-row" > <div x="1%" y="1%" width="98%" height="98%" layout="vertical-row" >
<header text_align="center" width="80%" align="center" text="SuperTuxKart Options"/> <header text_align="center" width="80%" align="center" text="SuperTuxKart Options"/>
@ -59,5 +59,4 @@
</div> </div>
<icon-button id="back" x="0" y="0" height="8%" icon="gui/back.png"/> <icon-button id="back" x="0" y="0" height="8%" icon="gui/back.png"/>
</stkgui> </stkgui>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<stkgui> <stkgui>
<div x="1%" y="1%" width="98%" height="98%" layout="vertical-row" > <div x="1%" y="1%" width="98%" height="98%" layout="vertical-row" >
<header text_align="center" width="80%" align="center" text="SuperTuxKart Options"/> <header text_align="center" width="80%" align="center" text="SuperTuxKart Options"/>
@ -80,5 +80,4 @@
</div> </div>
<icon-button id="back" x="0" y="0" height="8%" icon="gui/back.png"/> <icon-button id="back" x="0" y="0" height="8%" icon="gui/back.png"/>
</stkgui> </stkgui>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<stkgui> <stkgui>
<div x="5%" y="5%" width="90%" height="90%" layout="vertical-row" > <div x="5%" y="5%" width="90%" height="90%" layout="vertical-row" >
<header id="title" width="100%" text_align="center" text="Paused" proportion="3" /> <header id="title" width="100%" text_align="center" text="Paused" proportion="3" />
@ -29,5 +29,4 @@
<spacer width="20" height="35" /> <spacer width="20" height="35" />
</div> </div>
</stkgui> </stkgui>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<stkgui> <stkgui>
<div x="2%" y="10%" width="96%" height="80%" layout="vertical-row" > <div x="2%" y="10%" width="96%" height="80%" layout="vertical-row" >
<label id="title" width="100%" text_align="center" text="Press a key" proportion="1" /> <label id="title" width="100%" text_align="center" text="Press a key" proportion="1" />
@ -11,5 +11,4 @@
<button id="cancel" I18N="When configuring input" text="Press ESC to cancel" align="center"/> <button id="cancel" I18N="When configuring input" text="Press ESC to cancel" align="center"/>
</div> </div>
</stkgui> </stkgui>

View File

@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<stkgui> <stkgui>
<div x="5%" y="5%" width="90%" height="90%" layout="vertical-row" > <div x="5%" y="5%" width="90%" height="90%" layout="vertical-row" >
<header id="title" width="100%" text_align="center" text="Paused" proportion="3" /> <header id="title" width="100%" text_align="center" text="Paused" proportion="3" />
<!-- FIXME: some play in proportions occur below because the text of an icon <!-- FIXME: some play in proportions occur below because the text of an icon
@ -35,5 +34,4 @@
<spacer width="20" height="35" /> <spacer width="20" height="35" />
</div> </div>
</stkgui> </stkgui>

View File

@ -1,3 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<stkgui> <stkgui>
<div x="2%" y="5%" width="100%" height="95%" layout="vertical-row" id="div"> <div x="2%" y="5%" width="100%" height="95%" layout="vertical-row" id="div">
<roundedbox width="90%" proportion="1" align="center"> <roundedbox width="90%" proportion="1" align="center">

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<stkgui> <stkgui>
<div x="5%" y="5%" width="90%" height="90%" layout="vertical-row" > <div x="5%" y="5%" width="90%" height="90%" layout="vertical-row" >
<header width="80%" text="Race Setup" align="center" text_align="center" /> <header width="80%" text="Race Setup" align="center" text_align="center" />
@ -39,5 +39,4 @@
</div> </div>
<icon-button id="back" x="0" y="0" height="8%" icon="gui/back.png"/> <icon-button id="back" x="0" y="0" height="8%" icon="gui/back.png"/>
</stkgui> </stkgui>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<stkgui> <stkgui>
<div x="5%" y="5%" width="90%" height="90%" layout="vertical-row" > <div x="5%" y="5%" width="90%" height="90%" layout="vertical-row" >
<header id="title" width="80%" text="Race Setup" align="center" text_align="center" /> <header id="title" width="80%" text="Race Setup" align="center" text_align="center" />
@ -42,5 +42,4 @@
<spacer height="8%" width="1"/> <spacer height="8%" width="1"/>
</div> </div>
</stkgui> </stkgui>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<stkgui> <stkgui>
<icon-button id="back" x="0" y="0" height="8%" icon="gui/back.png"/> <icon-button id="back" x="0" y="0" height="8%" icon="gui/back.png"/>
<div x="5%" y="5%" width="90%" height="90%" layout="vertical-row" > <div x="5%" y="5%" width="90%" height="90%" layout="vertical-row" >
@ -41,7 +41,5 @@
</div> </div>
<button id="continue" I18N="In soccer setup screen" text="Continue" align="center" width="60%"/> <button id="continue" I18N="In soccer setup screen" text="Continue" align="center" width="60%"/>
</div> </div>
</stkgui> </stkgui>

View File

@ -1,10 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<stkgui> <stkgui>
<div x="1%" y="1%" width="99%" height="99%"> <div x="1%" y="1%" width="99%" height="99%">
<div x="2%" y="2%" width="96%" height="96%" layout="vertical-row"> <div x="2%" y="2%" width="96%" height="96%" layout="vertical-row">
<label id="name" width="100%" text_align="center"/> <label id="name" width="100%" text_align="center"/>
<spacer width="1" height="5%"/> <spacer width="1" height="5%"/>
@ -72,6 +69,5 @@
</div> </div>
<icon-button id="closePopup" x="0" y="0" width="8%" height="8%" icon="gui/back.png"/> <icon-button id="closePopup" x="0" y="0" width="8%" height="8%" icon="gui/back.png"/>
</div> </div>
</stkgui> </stkgui>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<stkgui> <stkgui>
<icon-button id="back" x="0" y="0" height="8%" icon="gui/back.png"/> <icon-button id="back" x="0" y="0" height="8%" icon="gui/back.png"/>
<div x="2%" y="1%" width="96%" height="99%" layout="vertical-row" > <div x="2%" y="1%" width="96%" height="99%" layout="vertical-row" >
@ -27,5 +27,4 @@
<spacer width="100%" height="2%" /> <spacer width="100%" height="2%" />
</div> </div>
</stkgui> </stkgui>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<stkgui> <stkgui>
<icon-button id="back" x="0" y="0" height="8%" icon="gui/back.png"/> <icon-button id="back" x="0" y="0" height="8%" icon="gui/back.png"/>
<div x="5%" y="2%" width="90%" height="96%" layout="vertical-row" > <div x="5%" y="2%" width="90%" height="96%" layout="vertical-row" >
@ -16,6 +16,4 @@
</div> </div>
<button id="play" x="-200" y="-40" height="35" align="right" text="Play all"/> <button id="play" x="-200" y="-40" height="35" align="right" text="Play all"/>
</stkgui> </stkgui>

View File

@ -1,12 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<stkgui> <stkgui>
<div x="2%" y="10%" width="96%" height="80%" layout="vertical-row" > <div x="2%" y="10%" width="96%" height="80%" layout="vertical-row" >
<label id="title" width="100%" text_align="left" word_wrap="true" proportion="1" /> <label id="title" width="100%" text_align="left" word_wrap="true" proportion="1" />
<spacer height="10" width="10" /> <spacer height="10" width="10" />
<button id="continue" I18N="Button in tutorial" text="Continue" align="right"/> <button id="continue" I18N="Button in tutorial" text="Continue" align="right"/>
</div> </div>
</stkgui> </stkgui>

View File

@ -1,3 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<stkgui> <stkgui>
<div x="1%" y="1%" width="98%" height="98%" layout="vertical-row" > <div x="1%" y="1%" width="98%" height="98%" layout="vertical-row" >
@ -61,6 +62,6 @@
</box> </box>
<spacer width="20" height="15"/> <spacer width="20" height="15"/>
</div> </div>
<icon-button id="back" x="0" y="0" height="8%" icon="gui/back.png"/>
<icon-button id="back" x="0" y="0" height="8%" icon="gui/back.png"/>
</stkgui> </stkgui>

View File

@ -1,3 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<stkgui> <stkgui>
<div x="1%" y="1%" width="98%" height="98%" layout="vertical-row" > <div x="1%" y="1%" width="98%" height="98%" layout="vertical-row" >
@ -13,7 +14,7 @@
<icon-button id="tab_controls" width="128" height="128" icon="gui/options_input.png"/> <icon-button id="tab_controls" width="128" height="128" icon="gui/options_input.png"/>
</tabs> </tabs>
<box proportion="1" width="98%" layout="vertical-row"> <box proportion="1" width="100%" layout="vertical-row">
<spacer height="15" width="10"/> <spacer height="15" width="10"/>
@ -55,7 +56,7 @@
<label id="message" width="80%" align="center" text_align="left"/> <label id="message" width="80%" align="center" text_align="left"/>
</div> </div>
<spacer width="20" height="25"/> <spacer width="20" height="25"/>
<buttonbar id="options" width="90%" height="13%" align="bottom"> <buttonbar id="options" width="90%" height="13%" align="center">
<icon-button id="ok" width="64" height="64" icon="gui/green_check.png" <icon-button id="ok" width="64" height="64" icon="gui/green_check.png"
I18N="Login dialog" text="OK" label_location="bottom"/> I18N="Login dialog" text="OK" label_location="bottom"/>
<icon-button id="new_user" width="64" height="64" icon="gui/gp_add_track.png" <icon-button id="new_user" width="64" height="64" icon="gui/gp_add_track.png"
@ -68,8 +69,7 @@
I18N="Login dialog" text="Cancel" label_location="bottom"/> I18N="Login dialog" text="Cancel" label_location="bottom"/>
</buttonbar> </buttonbar>
</box> </box>
<spacer width="20" height="15"/>
</div> </div>
<icon-button id="back" x="0" y="0" height="8%" icon="gui/back.png"/>
<icon-button id="back" x="0" y="0" height="8%" icon="gui/back.png"/>
</stkgui> </stkgui>

View File

@ -1,20 +1,25 @@
// From http://http.developer.nvidia.com/GPUGems3/gpugems3_ch40.html // From http://http.developer.nvidia.com/GPUGems3/gpugems3_ch40.html
uniform layout(size1x16) restrict readonly image2D source; uniform layout(size1x16) restrict readonly image2D source;
uniform layout(size1x32) restrict readonly image2D depth;
uniform layout(size1x16) volatile restrict writeonly image2D dest; uniform layout(size1x16) volatile restrict writeonly image2D dest;
uniform float sigma = 5.; uniform float sigma = 5.;
layout (local_size_x = 8, local_size_y = 8) in; layout (local_size_x = 8, local_size_y = 8) in;
shared float local_src[8 + 2 * 8][8]; shared float local_src[8 + 2 * 8][8];
shared float local_depth[8 + 2 * 8][8];
void main() void main()
{ {
int x = int(gl_LocalInvocationID.x), y = int(gl_LocalInvocationID.y); int x = int(gl_LocalInvocationID.x), y = int(gl_LocalInvocationID.y);
ivec2 uv = ivec2(gl_GlobalInvocationID.x, gl_GlobalInvocationID.y); ivec2 uv = ivec2(gl_GlobalInvocationID.x, gl_GlobalInvocationID.y);
local_src[x][y] = imageLoad(source, ivec2(uv) - ivec2(8, 0)).x; local_src[x][y] = imageLoad(source, ivec2(uv) - ivec2(8, 0)).x;
local_depth[x][y] = imageLoad(depth, ivec2(uv) - ivec2(8, 0)).x;
local_src[x + 8][y] = imageLoad(source, ivec2(uv)).x; local_src[x + 8][y] = imageLoad(source, ivec2(uv)).x;
local_depth[x + 8][y] = imageLoad(depth, ivec2(uv)).x;
local_src[x + 16][y] = imageLoad(source, ivec2(uv) + ivec2(8, 0)).x; local_src[x + 16][y] = imageLoad(source, ivec2(uv) + ivec2(8, 0)).x;
local_depth[x + 16][y] = imageLoad(depth, ivec2(uv) + ivec2(8, 0)).x;
barrier(); barrier();
@ -23,14 +28,20 @@ void main()
g1 = exp(-0.5 / (sigma * sigma)); g1 = exp(-0.5 / (sigma * sigma));
g2 = g1 * g1; g2 = g1 * g1;
float sum = local_src[x + 8][y] * g0; float sum = local_src[x + 8][y] * g0;
float pixel_depth = local_depth[x + 8][y];
g0 *= g1; g0 *= g1;
g1 *= g2; g1 *= g2;
float tmp_weight, total_weight = g0;
for (int j = 1; j < 8; j++) { for (int j = 1; j < 8; j++) {
sum += local_src[8 + x - j][y] * g0; tmp_weight = max(0.0, 1.0 - .001 * abs(local_depth[8 + x - j][y] - pixel_depth));
sum += local_src[8 + x + j][y] * g0; total_weight += g0 * tmp_weight;
sum += local_src[8 + x - j][y] * g0 * tmp_weight;
tmp_weight = max(0.0, 1.0 - .001 * abs(local_depth[8 + x + j][y] - pixel_depth));
total_weight += g0 * tmp_weight;
sum += local_src[8 + x + j][y] * g0 * tmp_weight;
g0 *= g1; g0 *= g1;
g1 *= g2; g1 *= g2;
} }
imageStore(dest, ivec2(uv), vec4(sum)); imageStore(dest, ivec2(uv), vec4(sum / total_weight));
} }

View File

@ -0,0 +1,37 @@
// From http://http.developer.nvidia.com/GPUGems3/gpugems3_ch40.html
uniform sampler2D tex;
uniform sampler2D depth;
uniform vec2 pixel;
uniform float sigma = 5.;
out vec4 FragColor;
void main()
{
vec2 uv = gl_FragCoord.xy * pixel;
float X = uv.x;
float Y = uv.y;
float g0, g1, g2;
g0 = 1.0 / (sqrt(2.0 * 3.14) * sigma);
g1 = exp(-0.5 / (sigma * sigma));
g2 = g1 * g1;
vec4 sum = texture(tex, vec2(X, Y)) * g0;
float pixel_depth = texture(depth, vec2(X, Y)).x;
g0 *= g1;
g1 *= g2;
float tmp_weight, total_weight = g0;
for (int i = 1; i < 9; i++) {
tmp_weight = max(0.0, 1.0 - .001 * abs(texture(depth, vec2(X - i * pixel.x, Y)).x - pixel_depth));
sum += texture(tex, vec2(X - i * pixel.x, Y)) * g0 * tmp_weight;
total_weight += g0 * tmp_weight;
tmp_weight = max(0.0, 1.0 - .001 * abs(texture(depth, vec2(X + i * pixel.x, Y)).x - pixel_depth));
sum += texture(tex, vec2(X + i * pixel.x, Y)) * g0 * tmp_weight;
total_weight += g0 * tmp_weight;
g0 *= g1;
g1 *= g2;
}
FragColor = sum / total_weight;
}

View File

@ -1,20 +1,25 @@
// From http://http.developer.nvidia.com/GPUGems3/gpugems3_ch40.html // From http://http.developer.nvidia.com/GPUGems3/gpugems3_ch40.html
uniform layout(size1x16) restrict readonly image2D source; uniform layout(size1x16) restrict readonly image2D source;
uniform layout(size1x32) restrict readonly image2D depth;
uniform layout(size1x16) volatile restrict writeonly image2D dest; uniform layout(size1x16) volatile restrict writeonly image2D dest;
uniform float sigma = 5.; uniform float sigma = 5.;
layout (local_size_x = 8, local_size_y = 8) in; layout (local_size_x = 8, local_size_y = 8) in;
shared float local_src[8][8 + 2 * 8]; shared float local_src[8][8 + 2 * 8];
shared float local_depth[8][8 + 2 * 8];
void main() void main()
{ {
int x = int(gl_LocalInvocationID.x), y = int(gl_LocalInvocationID.y); int x = int(gl_LocalInvocationID.x), y = int(gl_LocalInvocationID.y);
ivec2 uv = ivec2(gl_GlobalInvocationID.x, gl_GlobalInvocationID.y); ivec2 uv = ivec2(gl_GlobalInvocationID.x, gl_GlobalInvocationID.y);
local_src[x][y] = imageLoad(source, ivec2(uv) - ivec2(0, 8)).x; local_src[x][y] = imageLoad(source, ivec2(uv) - ivec2(0, 8)).x;
local_depth[x][y] = imageLoad(depth, ivec2(uv) - ivec2(0, 8)).x;
local_src[x][y + 8] = imageLoad(source, ivec2(uv)).x; local_src[x][y + 8] = imageLoad(source, ivec2(uv)).x;
local_depth[x][y + 8] = imageLoad(depth, ivec2(uv)).x;
local_src[x][y + 16] = imageLoad(source, ivec2(uv) + ivec2(0, 8)).x; local_src[x][y + 16] = imageLoad(source, ivec2(uv) + ivec2(0, 8)).x;
local_depth[x][y + 16] = imageLoad(depth, ivec2(uv) + ivec2(0, 8)).x;
barrier(); barrier();
@ -23,14 +28,21 @@ void main()
g1 = exp(-0.5 / (sigma * sigma)); g1 = exp(-0.5 / (sigma * sigma));
g2 = g1 * g1; g2 = g1 * g1;
float sum = local_src[x][y + 8] * g0; float sum = local_src[x][y + 8] * g0;
float pixel_depth = local_depth[x][y + 8];
g0 *= g1; g0 *= g1;
g1 *= g2; g1 *= g2;
float tmp_weight, total_weight = g0;
for (int j = 1; j < 8; j++) { for (int j = 1; j < 8; j++) {
sum += local_src[x][y + 8 + j] * g0; tmp_weight = max(0.0, 1.0 - .001 * abs(local_depth[x][y + 8 + j] - pixel_depth));
sum += local_src[x][y + 8 - j] * g0; sum += local_src[x][y + 8 + j] * g0 * tmp_weight;
total_weight += g0 * tmp_weight;
tmp_weight = max(0.0, 1.0 - .001 * abs(local_depth[x][y + 8 - j] - pixel_depth));
sum += local_src[x][y + 8 - j] * g0 * tmp_weight;
total_weight += g0 * tmp_weight;
g0 *= g1; g0 *= g1;
g1 *= g2; g1 *= g2;
} }
imageStore(dest, ivec2(uv), vec4(sum)); imageStore(dest, ivec2(uv), vec4(sum / total_weight));
} }

View File

@ -0,0 +1,38 @@
// From http://http.developer.nvidia.com/GPUGems3/gpugems3_ch40.html
uniform sampler2D tex;
uniform sampler2D depth;
uniform vec2 pixel;
uniform float sigma = 5.;
out vec4 FragColor;
void main()
{
vec2 uv = gl_FragCoord.xy * pixel;
float X = uv.x;
float Y = uv.y;
float g0, g1, g2;
g0 = 1.0 / (sqrt(2.0 * 3.14) * sigma);
g1 = exp(-0.5 / (sigma * sigma));
g2 = g1 * g1;
vec4 sum = texture(tex, vec2(X, Y)) * g0;
float pixel_depth = texture(depth, vec2(X, Y)).x;
g0 *= g1;
g1 *= g2;
float tmp_weight, total_weight = g0;
for (int i = 1; i < 9; i++) {
tmp_weight = max(0.0, 1.0 - .001 * abs(texture(depth, vec2(X, Y - i * pixel.y)).x - pixel_depth));
sum += texture(tex, vec2(X, Y - i * pixel.y)) * g0 * tmp_weight;
total_weight += g0 * tmp_weight;
tmp_weight = max(0.0, 1.0 - .001 * abs(texture(depth, vec2(X, Y + i * pixel.y)).x - pixel_depth));
sum += texture(tex, vec2(X, Y + i * pixel.y)) * g0 * tmp_weight;
total_weight += g0 * tmp_weight;
g0 *= g1;
g1 *= g2;
}
FragColor = sum / total_weight;
}

View File

@ -21,17 +21,9 @@
uniform mat4 ModelViewProjectionMatrix; uniform mat4 ModelViewProjectionMatrix;
uniform float time; uniform float time;
#if __VERSION__ >= 130 layout(location = 0) in vec3 Position;
in vec3 Position; layout(location = 3) in vec2 Texcoord;
in vec2 Texcoord;
out vec2 uv; out vec2 uv;
#else
attribute vec3 Position;
attribute vec2 Texcoord;
varying vec2 uv;
#endif
void main() void main()
{ {

View File

@ -1,27 +1,39 @@
uniform mat4 ModelViewProjectionMatrix; #ifdef UBO_DISABLED
uniform mat4 ModelViewMatrix; uniform mat4 ViewMatrix;
uniform mat4 ProjectionMatrix;
uniform mat4 InverseViewMatrix;
uniform mat4 InverseProjectionMatrix;
#else
layout (std140) uniform MatrixesData
{
mat4 ViewMatrix;
mat4 ProjectionMatrix;
mat4 InverseViewMatrix;
mat4 InverseProjectionMatrix;
mat4 ShadowViewProjMatrixes[4];
vec2 screen;
};
#endif
#if __VERSION__ >= 130 uniform mat4 ModelMatrix;
#if __VERSION__ >= 330
layout(location = 0) in vec3 Position;
layout(location = 3) in vec2 Texcoord;
layout(location = 4) in vec2 SecondTexcoord;
#else
in vec3 Position; in vec3 Position;
in vec2 Texcoord; in vec2 Texcoord;
in vec2 SecondTexcoord; in vec2 SecondTexcoord;
#endif
out vec2 uv; out vec2 uv;
out vec2 uv_bis; out vec2 uv_bis;
out float camdist; out float camdist;
#else
attribute vec3 Position;
attribute vec2 Texcoord;
attribute vec2 SecondTexcoord;
varying vec2 uv;
varying vec2 uv_bis;
varying float camdist;
#endif
void main() { void main() {
gl_Position = ModelViewProjectionMatrix * vec4(Position, 1.); gl_Position = ProjectionMatrix * ViewMatrix * ModelMatrix * vec4(Position, 1.);
uv = Texcoord; uv = Texcoord;
uv_bis = SecondTexcoord; uv_bis = SecondTexcoord;
camdist = length(ModelViewMatrix * vec4(Position, 1.)); camdist = length(ViewMatrix * ModelMatrix * vec4(Position, 1.));
} }

View File

@ -0,0 +1,18 @@
layout (std140) uniform MatrixesData
{
mat4 ViewMatrix;
mat4 ProjectionMatrix;
mat4 InverseViewMatrix;
mat4 InverseProjectionMatrix;
mat4 ShadowViewProjMatrixes[4];
vec2 screen;
};
uniform int idx;
in vec3 Position;
void main(void)
{
gl_Position = ShadowViewProjMatrixes[idx] * vec4(Position, 1.);
}

View File

@ -1,30 +0,0 @@
// From http://http.developer.nvidia.com/GPUGems3/gpugems3_ch40.html
uniform sampler2D tex;
uniform vec2 pixel;
uniform float sigma = 5.;
out vec4 FragColor;
void main()
{
vec2 uv = gl_FragCoord.xy * pixel;
float X = uv.x;
float Y = uv.y;
float g0, g1, g2;
g0 = 1.0 / (sqrt(2.0 * 3.14) * sigma);
g1 = exp(-0.5 / (sigma * sigma));
g2 = g1 * g1;
vec4 sum = texture(tex, vec2(X, Y)) * g0;
g0 *= g1;
g1 *= g2;
for (int i = 1; i < 9; i++) {
sum += texture(tex, vec2(X - i * pixel.x, Y)) * g0;
sum += texture(tex, vec2(X + i * pixel.x, Y)) * g0;
g0 *= g1;
g1 *= g2;
}
FragColor = sum;
}

View File

@ -1,31 +0,0 @@
// From http://http.developer.nvidia.com/GPUGems3/gpugems3_ch40.html
uniform sampler2D tex;
uniform vec2 pixel;
uniform float sigma = 5.;
out vec4 FragColor;
void main()
{
vec2 uv = gl_FragCoord.xy * pixel;
float X = uv.x;
float Y = uv.y;
float g0, g1, g2;
g0 = 1.0 / (sqrt(2.0 * 3.14) * sigma);
g1 = exp(-0.5 / (sigma * sigma));
g2 = g1 * g1;
vec4 sum = texture(tex, vec2(X, Y)) * g0;
g0 *= g1;
g1 *= g2;
for (int i = 1; i < 9; i++) {
sum += texture(tex, vec2(X, Y - i * pixel.y)) * g0;
sum += texture(tex, vec2(X, Y + i * pixel.y)) * g0;
g0 *= g1;
g1 *= g2;
}
FragColor = sum;
}

View File

@ -12,6 +12,7 @@ uniform sampler3D SHB;
uniform float R_wcs = 10.; uniform float R_wcs = 10.;
uniform vec3 extents; uniform vec3 extents;
uniform mat4 RHMatrix; uniform mat4 RHMatrix;
uniform mat4 InvRHMatrix;
layout (std140) uniform MatrixesData layout (std140) uniform MatrixesData
{ {
@ -55,7 +56,7 @@ void main()
if (depth==1.0) discard; if (depth==1.0) discard;
vec4 pos_screen_space = getPosFromUVDepth(vec3(uv, depth), InverseProjectionMatrix); vec4 pos_screen_space = getPosFromUVDepth(vec3(uv, depth), InverseProjectionMatrix);
vec4 tmp = (inverse(RHMatrix) * InverseViewMatrix * pos_screen_space); vec4 tmp = (InvRHMatrix * InverseViewMatrix * pos_screen_space);
vec3 pos = tmp.xyz / tmp.w; vec3 pos = tmp.xyz / tmp.w;
vec3 normal_screen_space = normalize(DecodeNormal(2. * texture(ntex, uv).xy - 1.)); vec3 normal_screen_space = normalize(DecodeNormal(2. * texture(ntex, uv).xy - 1.));
vec3 normal = (transpose(ViewMatrix) * vec4(normal_screen_space, 0.)).xyz; vec3 normal = (transpose(ViewMatrix) * vec4(normal_screen_space, 0.)).xyz;

View File

@ -3,22 +3,20 @@ uniform mat4 ModelViewProjectionMatrix;
uniform mat4 TransposeInverseModelView; uniform mat4 TransposeInverseModelView;
#if __VERSION__ >= 130 #if __VERSION__ >= 330
layout(location = 0) in vec3 Position;
layout(location = 1) in vec3 Normal;
layout(location = 2) in vec4 Color;
layout(location = 3) in vec2 Texcoord;
#else
in vec3 Position; in vec3 Position;
in vec3 Normal; in vec3 Normal;
in vec2 Texcoord;
in vec4 Color; in vec4 Color;
out vec3 nor; in vec2 Texcoord;
out vec2 uv;
#else
attribute vec3 Position;
attribute vec3 Normal;
attribute vec2 Texcoord;
attribute vec4 Color;
varying vec3 nor;
varying vec2 uv;
#endif #endif
out vec3 nor;
out vec2 uv;
void main() void main()
{ {

View File

@ -10,15 +10,25 @@ layout (std140) uniform MatrixesData
uniform vec3 windDir; uniform vec3 windDir;
#if __VERSION__ >= 330
layout(location = 0) in vec3 Position;
layout(location = 1) in vec3 Normal;
layout(location = 2) in vec4 Color;
layout(location = 3) in vec2 Texcoord;
layout(location = 7) in vec3 Origin;
layout(location = 8) in vec3 Orientation;
layout(location = 9) in vec3 Scale;
#else
in vec3 Position;
in vec3 Normal;
in vec4 Color;
in vec2 Texcoord;
in vec3 Origin; in vec3 Origin;
in vec3 Orientation; in vec3 Orientation;
in vec3 Scale; in vec3 Scale;
#endif
in vec3 Position;
in vec3 Normal;
in vec2 Texcoord;
in vec4 Color;
out vec3 nor; out vec3 nor;
out vec2 uv; out vec2 uv;

View File

@ -15,14 +15,24 @@ layout (std140) uniform MatrixesData
}; };
#endif #endif
in vec3 Origin; #if __VERSION__ >= 330
in vec3 Orientation; layout(location = 0) in vec3 Position;
in vec3 Scale; layout(location = 1) in vec3 Normal;
layout(location = 3) in vec2 Texcoord;
layout(location = 7) in vec3 Origin;
layout(location = 8) in vec3 Orientation;
layout(location = 9) in vec3 Scale;
#else
in vec3 Position; in vec3 Position;
in vec3 Normal; in vec3 Normal;
in vec2 Texcoord; in vec2 Texcoord;
in vec3 Origin;
in vec3 Orientation;
in vec3 Scale;
#endif
out vec3 nor; out vec3 nor;
out vec2 uv; out vec2 uv;

View File

@ -7,12 +7,21 @@ layout (std140) uniform MatrixesData
mat4 ShadowViewProjMatrixes[4]; mat4 ShadowViewProjMatrixes[4];
}; };
#if __VERSION__ >= 330
layout(location = 0) in vec3 Position;
layout(location = 3) in vec2 Texcoord;
layout(location = 7) in vec3 Origin;
layout(location = 8) in vec3 Orientation;
layout(location = 9) in vec3 Scale;
#else
in vec3 Position;
in vec2 Texcoord;
in vec3 Origin; in vec3 Origin;
in vec3 Orientation; in vec3 Orientation;
in vec3 Scale; in vec3 Scale;
#endif
in vec3 Position;
in vec2 Texcoord;
#ifdef VSLayer #ifdef VSLayer
out vec2 uv; out vec2 uv;

View File

@ -0,0 +1,10 @@
uniform sampler2DArray tex;
uniform int layer;
in vec2 uv;
out vec4 FragColor;
void main()
{
FragColor = texture(tex, vec3(uv, float(layer)));
}

View File

@ -10,24 +10,21 @@ layout (std140) uniform MatrixesData
uniform mat4 ModelMatrix; uniform mat4 ModelMatrix;
uniform mat4 InverseModelMatrix; uniform mat4 InverseModelMatrix;
#if __VERSION__ >= 130 #if __VERSION__ >= 330
layout(location = 0) in vec3 Position;
layout(location = 3) in vec2 Texcoord;
layout(location = 5) in vec3 Tangent;
layout(location = 6) in vec3 Bitangent;
#else
in vec3 Position; in vec3 Position;
in vec2 Texcoord; in vec2 Texcoord;
in vec3 Tangent; in vec3 Tangent;
in vec3 Bitangent; in vec3 Bitangent;
#endif
out vec3 tangent; out vec3 tangent;
out vec3 bitangent; out vec3 bitangent;
out vec2 uv; out vec2 uv;
#else
attribute vec3 Position;
attribute vec2 Texcoord;
attribute vec3 Tangent;
attribute vec3 Bitangent;
varying vec3 tangent;
varying vec3 bitangent;
varying vec2 uv;
#endif
void main() void main()
{ {

View File

@ -24,25 +24,24 @@ uniform mat4 TextureMatrix =
0., 0., 1., 0., 0., 0., 1., 0.,
0., 0., 0., 1.); 0., 0., 0., 1.);
#if __VERSION__ >= 130 #if __VERSION__ >= 330
layout(location = 0) in vec3 Position;
layout(location = 1) in vec3 Normal;
layout(location = 2) in vec4 Color;
layout(location = 3) in vec2 Texcoord;
layout(location = 4) in vec2 SecondTexcoord;
#else
in vec3 Position; in vec3 Position;
in vec2 Texcoord;
in vec2 SecondTexcoord;
in vec3 Normal; in vec3 Normal;
in vec4 Color; in vec4 Color;
in vec2 Texcoord;
in vec2 SecondTexcoord;
#endif
out vec3 nor; out vec3 nor;
out vec2 uv; out vec2 uv;
out vec2 uv_bis; out vec2 uv_bis;
out vec4 color; out vec4 color;
#else
attribute vec3 Position;
attribute vec3 Normal;
attribute vec2 Texcoord;
attribute vec2 SecondTexcoord;
varying vec3 nor;
varying vec2 uv;
varying vec2 uv_bis;
#endif
void main(void) void main(void)

View File

@ -9,9 +9,10 @@ uniform mat4 TextureMatrix =
0., 0., 0., 1.); 0., 0., 0., 1.);
in vec3 Position; layout(location = 0) in vec3 Position;
in vec2 Texcoord; layout(location = 1) in vec3 Normal;
in vec3 Normal; layout(location = 3) in vec2 Texcoord;
out vec3 nor; out vec3 nor;
out vec2 uv; out vec2 uv;

View File

@ -9,8 +9,8 @@ layout (std140) uniform MatrixesData
uniform mat4 ModelMatrix; uniform mat4 ModelMatrix;
in vec3 Position; layout(location = 0) in vec3 Position;
in vec2 Texcoord; layout(location = 3) in vec2 Texcoord;
#ifdef VSLayer #ifdef VSLayer
out vec2 uv; out vec2 uv;

View File

@ -56,7 +56,7 @@ void main(void)
vec3 norm = -normalize(cross(ddy, ddx)); vec3 norm = -normalize(cross(ddy, ddx));
float r = radius / FragPos.z; float r = radius / FragPos.z;
float phi = 30. * (x ^ y) + 10. * x * y; float phi = 3. * (x ^ y) + x * y;
float bl = 0.0; float bl = 0.0;
float m = log2(r) + 6 + log2(invSamples); float m = log2(r) + 6 + log2(invSamples);

View File

@ -1,22 +0,0 @@
uniform mat4 ModelViewProjectionMatrix;
uniform mat4 TextureMatrix;
#if __VERSION__ >= 130
in vec3 Position;
in vec2 Texcoord;
in vec4 Color;
out vec2 uv;
out vec4 color;
#else
attribute vec3 Position;
attribute vec2 Texcoord;
varying vec2 uv;
#endif
void main()
{
uv = (TextureMatrix * vec4(Texcoord, 1., 1.)).xy;
gl_Position = ModelViewProjectionMatrix * vec4(Position, 1.);
color = Color;
}

View File

@ -68,6 +68,14 @@ when the border that intersect at this corner are enabled.
<!-- Stateless --> <!-- Stateless -->
<element type="background" image="ocean/background.jpg" /> <element type="background" image="ocean/background.jpg" />
<element type="achievement-message" image="ocean/glassbutton.png"
left_border="13" right_border="13" top_border="13" bottom_border="13"
preserve_h_aspect_ratios="true" hborder_out_portion="0" vborder_out_portion="0"/>
<element type="friend-message" image="ocean/glassbutton.png"
left_border="13" right_border="13" top_border="13" bottom_border="13"
preserve_h_aspect_ratios="true" hborder_out_portion="0" vborder_out_portion="0"/>
<element type="button" state="neutral" image="ocean/glassbutton.png" <element type="button" state="neutral" image="ocean/glassbutton.png"
left_border="13" right_border="13" top_border="13" bottom_border="13" left_border="13" right_border="13" top_border="13" bottom_border="13"
preserve_h_aspect_ratios="true" hborder_out_portion="0" vborder_out_portion="0"/> preserve_h_aspect_ratios="true" hborder_out_portion="0" vborder_out_portion="0"/>

View File

@ -68,6 +68,14 @@ when the border that intersect at this corner are enabled.
<!-- Stateless --> <!-- Stateless -->
<element type="background" image="peach/background.jpg" /> <element type="background" image="peach/background.jpg" />
<element type="achievement-message" image="peach/achievement.png"
left_border="128" right_border="13" top_border="13" bottom_border="13"
preserve_h_aspect_ratios="true" hborder_out_portion="0.3" vborder_out_portion="0"/>
<element type="friend-message" image="peach/friend.png"
left_border="128" right_border="13" top_border="13" bottom_border="13"
preserve_h_aspect_ratios="true" hborder_out_portion="0" vborder_out_portion="0"/>
<element type="button" state="neutral" image="peach/glassbutton.png" <element type="button" state="neutral" image="peach/glassbutton.png"
left_border="13" right_border="13" top_border="13" bottom_border="13" left_border="13" right_border="13" top_border="13" bottom_border="13"
preserve_h_aspect_ratios="true" hborder_out_portion="0" vborder_out_portion="0"/> preserve_h_aspect_ratios="true" hborder_out_portion="0" vborder_out_portion="0"/>

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

BIN
data/skins/peach/friend.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

View File

@ -264,7 +264,7 @@ bool CIrrDeviceLinux::switchToFullscreen(bool reset)
// enumerate video modes // enumerate video modes
s32 modeCount; s32 modeCount;
XF86VidModeModeInfo** modes; XF86VidModeModeInfo** modes;
float refresh_rate; float refresh_rate, refresh_rate_old;
XF86VidModeGetAllModeLines(display, screennr, &modeCount, &modes); XF86VidModeGetAllModeLines(display, screennr, &modeCount, &modes);
@ -273,22 +273,17 @@ bool CIrrDeviceLinux::switchToFullscreen(bool reset)
{ {
if (bestMode==-1 && modes[i]->hdisplay >= Width && modes[i]->vdisplay >= Height) if (bestMode==-1 && modes[i]->hdisplay >= Width && modes[i]->vdisplay >= Height)
{ {
float pixels_per_second = modes[i]->dotclock * 1000.0;
float pixels_per_frame = modes[i]->htotal * modes[i]->vtotal;
refresh_rate = pixels_per_second / pixels_per_frame;
bestMode = i; bestMode = i;
} }
else if (bestMode!=-1 && else if (bestMode!=-1 &&
modes[i]->hdisplay == modes[bestMode]->hdisplay && modes[i]->hdisplay == modes[bestMode]->hdisplay &&
modes[i]->vdisplay == modes[bestMode]->vdisplay) modes[i]->vdisplay == modes[bestMode]->vdisplay)
{ {
float pixels_per_second = modes[i]->dotclock * 1000.0; refresh_rate_old = (modes[bestMode]->dotclock * 1000.0) / (modes[bestMode]->htotal * modes[bestMode]->vtotal);
float pixels_per_frame = modes[i]->htotal * modes[i]->vtotal; refresh_rate = (modes[i]->dotclock * 1000.0) / (modes[i]->htotal * modes[i]->vtotal);
float refresh_rate_tmp = pixels_per_second / pixels_per_frame;
if (refresh_rate_tmp > refresh_rate) if (refresh_rate > refresh_rate_old)
{ {
refresh_rate = refresh_rate_tmp;
bestMode = i; bestMode = i;
} }
} }
@ -298,9 +293,6 @@ bool CIrrDeviceLinux::switchToFullscreen(bool reset)
modes[i]->hdisplay <= modes[bestMode]->hdisplay && modes[i]->hdisplay <= modes[bestMode]->hdisplay &&
modes[i]->vdisplay <= modes[bestMode]->vdisplay) modes[i]->vdisplay <= modes[bestMode]->vdisplay)
{ {
float pixels_per_second = modes[i]->dotclock * 1000.0;
float pixels_per_frame = modes[i]->htotal * modes[i]->vtotal;
refresh_rate = pixels_per_second / pixels_per_frame;
bestMode = i; bestMode = i;
} }
} }

View File

@ -21,7 +21,7 @@
#include "achievements/achievement.hpp" #include "achievements/achievement.hpp"
#include "achievements/achievement_info.hpp" #include "achievements/achievement_info.hpp"
#include "guiengine/dialog_queue.hpp" #include "guiengine/message_queue.hpp"
#include "io/utf_writer.hpp" #include "io/utf_writer.hpp"
#include "config/player_manager.hpp" #include "config/player_manager.hpp"
#include "states_screens/dialogs/notification_dialog.hpp" #include "states_screens/dialogs/notification_dialog.hpp"
@ -202,8 +202,7 @@ void Achievement::check()
//show achievement //show achievement
core::stringw s = StringUtils::insertValues(_("Completed achievement \"%s\"."), core::stringw s = StringUtils::insertValues(_("Completed achievement \"%s\"."),
m_achievement_info->getTitle()); m_achievement_info->getTitle());
GUIEngine::DialogQueue::get()->pushDialog( MessageQueue::add(MessageQueue::MT_ACHIEVEMENT, s);
new NotificationDialog(NotificationDialog::T_Achievements, s));
// Sends a confirmation to the server that an achievement has been // Sends a confirmation to the server that an achievement has been
// completed, if a user is signed in. // completed, if a user is signed in.

View File

@ -33,6 +33,8 @@ AnimationBase::AnimationBase(const XMLNode &node)
node.get("fps", &fps); node.get("fps", &fps);
for(unsigned int i=0; i<node.getNumNodes(); i++) for(unsigned int i=0; i<node.getNumNodes(); i++)
{ {
if (node.getNode(i)->getName() == "animated-texture")
continue;
Ipo *ipo = new Ipo(*node.getNode(i), fps); Ipo *ipo = new Ipo(*node.getNode(i), fps);
m_all_ipos.push_back(ipo); m_all_ipos.push_back(ipo);
} }

View File

@ -1,5 +1,4 @@
#include "graphics/glwrap.hpp" #include "graphics/glwrap.hpp"
#include "irr_driver.hpp"
#include <fstream> #include <fstream>
#include <string> #include <string>
#include "config/user_config.hpp" #include "config/user_config.hpp"
@ -44,6 +43,7 @@ PFNGLUNIFORM4FVPROC glUniform4fv;
PFNGLGETPROGRAMIVPROC glGetProgramiv; PFNGLGETPROGRAMIVPROC glGetProgramiv;
PFNGLGETPROGRAMINFOLOGPROC glGetProgramInfoLog; PFNGLGETPROGRAMINFOLOGPROC glGetProgramInfoLog;
PFNGLGETATTRIBLOCATIONPROC glGetAttribLocation; PFNGLGETATTRIBLOCATIONPROC glGetAttribLocation;
PFNGLBINDATTRIBLOCATIONPROC glBindAttribLocation;
PFNGLBLENDEQUATIONPROC glBlendEquation; PFNGLBLENDEQUATIONPROC glBlendEquation;
PFNGLVERTEXATTRIBDIVISORPROC glVertexAttribDivisor; PFNGLVERTEXATTRIBDIVISORPROC glVertexAttribDivisor;
PFNGLDRAWARRAYSINSTANCEDPROC glDrawArraysInstanced; PFNGLDRAWARRAYSINSTANCEDPROC glDrawArraysInstanced;
@ -197,6 +197,7 @@ void initGL()
glGetProgramInfoLog = (PFNGLGETPROGRAMINFOLOGPROC)IRR_OGL_LOAD_EXTENSION("glGetProgramInfoLog"); glGetProgramInfoLog = (PFNGLGETPROGRAMINFOLOGPROC)IRR_OGL_LOAD_EXTENSION("glGetProgramInfoLog");
glTransformFeedbackVaryings = (PFNGLTRANSFORMFEEDBACKVARYINGSPROC)IRR_OGL_LOAD_EXTENSION("glTransformFeedbackVaryings"); glTransformFeedbackVaryings = (PFNGLTRANSFORMFEEDBACKVARYINGSPROC)IRR_OGL_LOAD_EXTENSION("glTransformFeedbackVaryings");
glGetAttribLocation = (PFNGLGETATTRIBLOCATIONPROC)IRR_OGL_LOAD_EXTENSION("glGetAttribLocation"); glGetAttribLocation = (PFNGLGETATTRIBLOCATIONPROC)IRR_OGL_LOAD_EXTENSION("glGetAttribLocation");
glBindAttribLocation = (PFNGLBINDATTRIBLOCATIONPROC)IRR_OGL_LOAD_EXTENSION("glBindAttribLocation");
glBlendEquation = (PFNGLBLENDEQUATIONPROC)IRR_OGL_LOAD_EXTENSION("glBlendEquation"); glBlendEquation = (PFNGLBLENDEQUATIONPROC)IRR_OGL_LOAD_EXTENSION("glBlendEquation");
glVertexAttribDivisor = (PFNGLVERTEXATTRIBDIVISORPROC)IRR_OGL_LOAD_EXTENSION("glVertexAttribDivisor"); glVertexAttribDivisor = (PFNGLVERTEXATTRIBDIVISORPROC)IRR_OGL_LOAD_EXTENSION("glVertexAttribDivisor");
glDrawArraysInstanced = (PFNGLDRAWARRAYSINSTANCEDPROC)IRR_OGL_LOAD_EXTENSION("glDrawArraysInstanced"); glDrawArraysInstanced = (PFNGLDRAWARRAYSINSTANCEDPROC)IRR_OGL_LOAD_EXTENSION("glDrawArraysInstanced");

View File

@ -25,6 +25,7 @@
#endif #endif
#include <vector> #include <vector>
#include "irr_driver.hpp"
#include "utils/log.hpp" #include "utils/log.hpp"
// already includes glext.h, which defines useful GL constants. // already includes glext.h, which defines useful GL constants.
@ -68,6 +69,7 @@ extern PFNGLUNIFORM4IPROC glUniform4i;
extern PFNGLGETPROGRAMIVPROC glGetProgramiv; extern PFNGLGETPROGRAMIVPROC glGetProgramiv;
extern PFNGLGETPROGRAMINFOLOGPROC glGetProgramInfoLog; extern PFNGLGETPROGRAMINFOLOGPROC glGetProgramInfoLog;
extern PFNGLGETATTRIBLOCATIONPROC glGetAttribLocation; extern PFNGLGETATTRIBLOCATIONPROC glGetAttribLocation;
extern PFNGLBINDATTRIBLOCATIONPROC glBindAttribLocation;
extern PFNGLBLENDEQUATIONPROC glBlendEquation; extern PFNGLBLENDEQUATIONPROC glBlendEquation;
extern PFNGLVERTEXATTRIBDIVISORPROC glVertexAttribDivisor; extern PFNGLVERTEXATTRIBDIVISORPROC glVertexAttribDivisor;
extern PFNGLDRAWARRAYSINSTANCEDPROC glDrawArraysInstanced; extern PFNGLDRAWARRAYSINSTANCEDPROC glDrawArraysInstanced;
@ -143,6 +145,19 @@ GLint LoadProgram(Types ... args)
{ {
GLint ProgramID = glCreateProgram(); GLint ProgramID = glCreateProgram();
loadAndAttach(ProgramID, args...); loadAndAttach(ProgramID, args...);
if (irr_driver->getGLSLVersion() < 330)
{
glBindAttribLocation(ProgramID, 0, "Position");
glBindAttribLocation(ProgramID, 1, "Normal");
glBindAttribLocation(ProgramID, 2, "Color");
glBindAttribLocation(ProgramID, 3, "Texcoord");
glBindAttribLocation(ProgramID, 4, "SecondTexcoord");
glBindAttribLocation(ProgramID, 5, "Tangent");
glBindAttribLocation(ProgramID, 6, "Bitangent");
glBindAttribLocation(ProgramID, 7, "Origin");
glBindAttribLocation(ProgramID, 8, "Orientation");
glBindAttribLocation(ProgramID, 9, "Scale");
}
glLinkProgram(ProgramID); glLinkProgram(ProgramID);
GLint Result = GL_FALSE; GLint Result = GL_FALSE;

View File

@ -443,7 +443,10 @@ void IrrDriver::initDevice()
glGetIntegerv(GL_MAJOR_VERSION, &GLMajorVersion); glGetIntegerv(GL_MAJOR_VERSION, &GLMajorVersion);
glGetIntegerv(GL_MINOR_VERSION, &GLMinorVersion); glGetIntegerv(GL_MINOR_VERSION, &GLMinorVersion);
} }
Log::info("IrrDriver", "OPENGL VERSION IS %d.%d", GLMajorVersion, GLMinorVersion); Log::info("IrrDriver", "OpenGL version: %d.%d", GLMajorVersion, GLMinorVersion);
Log::info("IrrDriver", "OpenGL vendor: %s", glGetString(GL_VENDOR));
Log::info("IrrDriver", "OpenGL renderer: %s", glGetString(GL_RENDERER));
Log::info("IrrDriver", "OpenGL version string: %s", glGetString(GL_VERSION));
m_glsl = (GLMajorVersion > 3 || (GLMajorVersion == 3 && GLMinorVersion >= 1)); m_glsl = (GLMajorVersion > 3 || (GLMajorVersion == 3 && GLMinorVersion >= 1));
// Parse extensions // Parse extensions

View File

@ -345,6 +345,7 @@ private:
class STKMeshSceneNode *m_sun_interposer; class STKMeshSceneNode *m_sun_interposer;
scene::CLensFlareSceneNode *m_lensflare; scene::CLensFlareSceneNode *m_lensflare;
scene::ICameraSceneNode *m_suncam; scene::ICameraSceneNode *m_suncam;
float m_shadows_cam[4][24];
std::vector<GlowData> m_glowing; std::vector<GlowData> m_glowing;
@ -380,6 +381,7 @@ private:
void renderSSAO(); void renderSSAO();
void renderLights(unsigned pointlightCount); void renderLights(unsigned pointlightCount);
void renderDisplacement(); void renderDisplacement();
void renderShadowsDebug();
void doScreenShot(); void doScreenShot();
public: public:
IrrDriver(); IrrDriver();

View File

@ -244,6 +244,8 @@ void PostProcessing::renderDiffuseEnvMap(const float *bSHCoeff, const float *gSH
void PostProcessing::renderGI(const core::matrix4 &RHMatrix, const core::vector3df &rh_extend, GLuint shr, GLuint shg, GLuint shb) void PostProcessing::renderGI(const core::matrix4 &RHMatrix, const core::vector3df &rh_extend, GLuint shr, GLuint shg, GLuint shb)
{ {
core::matrix4 InvRHMatrix;
RHMatrix.getInverse(InvRHMatrix);
glDisable(GL_DEPTH_TEST); glDisable(GL_DEPTH_TEST);
glUseProgram(FullScreenShader::GlobalIlluminationReconstructionShader::Program); glUseProgram(FullScreenShader::GlobalIlluminationReconstructionShader::Program);
glBindVertexArray(FullScreenShader::GlobalIlluminationReconstructionShader::vao); glBindVertexArray(FullScreenShader::GlobalIlluminationReconstructionShader::vao);
@ -267,7 +269,7 @@ void PostProcessing::renderGI(const core::matrix4 &RHMatrix, const core::vector3
} }
setTexture(3, irr_driver->getRenderTargetTexture(RTT_NORMAL_AND_DEPTH), GL_NEAREST, GL_NEAREST); setTexture(3, irr_driver->getRenderTargetTexture(RTT_NORMAL_AND_DEPTH), GL_NEAREST, GL_NEAREST);
setTexture(4, irr_driver->getDepthStencilTexture(), GL_NEAREST, GL_NEAREST); setTexture(4, irr_driver->getDepthStencilTexture(), GL_NEAREST, GL_NEAREST);
FullScreenShader::GlobalIlluminationReconstructionShader::setUniforms(RHMatrix, rh_extend, 3, 4, 0, 1, 2); FullScreenShader::GlobalIlluminationReconstructionShader::setUniforms(RHMatrix, InvRHMatrix, rh_extend, 3, 4, 0, 1, 2);
glDrawArrays(GL_TRIANGLES, 0, 3); glDrawArrays(GL_TRIANGLES, 0, 3);
} }
@ -413,7 +415,11 @@ void PostProcessing::renderGaussian17TapBlur(FrameBuffer &in_fbo, FrameBuffer &a
setTexture(0, in_fbo.getRTT()[0], GL_LINEAR, GL_LINEAR); setTexture(0, in_fbo.getRTT()[0], GL_LINEAR, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
setTexture(1, irr_driver->getFBO(FBO_LINEAR_DEPTH).getRTT()[0], GL_LINEAR, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
glUniform1i(FullScreenShader::Gaussian17TapHShader::uniform_tex, 0); glUniform1i(FullScreenShader::Gaussian17TapHShader::uniform_tex, 0);
glUniform1i(FullScreenShader::Gaussian17TapHShader::uniform_depth, 1);
glDrawArrays(GL_TRIANGLES, 0, 3); glDrawArrays(GL_TRIANGLES, 0, 3);
} }
@ -423,9 +429,11 @@ void PostProcessing::renderGaussian17TapBlur(FrameBuffer &in_fbo, FrameBuffer &a
glUseProgram(FullScreenShader::ComputeGaussian17TapHShader::Program); glUseProgram(FullScreenShader::ComputeGaussian17TapHShader::Program);
glBindImageTexture(0, in_fbo.getRTT()[0], 0, false, 0, GL_READ_ONLY, GL_R16F); glBindImageTexture(0, in_fbo.getRTT()[0], 0, false, 0, GL_READ_ONLY, GL_R16F);
glBindImageTexture(1, auxiliary.getRTT()[0], 0, false, 0, GL_WRITE_ONLY, GL_R16F); glBindImageTexture(1, irr_driver->getFBO(FBO_LINEAR_DEPTH).getRTT()[0], 1, false, 0, GL_READ_ONLY, GL_R32F);
glBindImageTexture(2, auxiliary.getRTT()[0], 0, false, 0, GL_WRITE_ONLY, GL_R16F);
glUniform1i(FullScreenShader::ComputeGaussian17TapHShader::uniform_source, 0); glUniform1i(FullScreenShader::ComputeGaussian17TapHShader::uniform_source, 0);
glUniform1i(FullScreenShader::ComputeGaussian17TapHShader::uniform_dest, 1); glUniform1i(FullScreenShader::ComputeGaussian17TapHShader::uniform_depth, 1);
glUniform1i(FullScreenShader::ComputeGaussian17TapHShader::uniform_dest, 2);
glDispatchCompute(in_fbo.getWidth() / 8, in_fbo.getHeight() / 8, 1); glDispatchCompute(in_fbo.getWidth() / 8, in_fbo.getHeight() / 8, 1);
} }
#endif #endif
@ -444,7 +452,11 @@ void PostProcessing::renderGaussian17TapBlur(FrameBuffer &in_fbo, FrameBuffer &a
setTexture(0, auxiliary.getRTT()[0], GL_LINEAR, GL_LINEAR); setTexture(0, auxiliary.getRTT()[0], GL_LINEAR, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
setTexture(1, irr_driver->getFBO(FBO_LINEAR_DEPTH).getRTT()[0], GL_LINEAR, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
glUniform1i(FullScreenShader::Gaussian17TapVShader::uniform_tex, 0); glUniform1i(FullScreenShader::Gaussian17TapVShader::uniform_tex, 0);
glUniform1i(FullScreenShader::Gaussian17TapVShader::uniform_depth, 1);
glDrawArrays(GL_TRIANGLES, 0, 3); glDrawArrays(GL_TRIANGLES, 0, 3);
} }
@ -453,9 +465,11 @@ void PostProcessing::renderGaussian17TapBlur(FrameBuffer &in_fbo, FrameBuffer &a
{ {
glUseProgram(FullScreenShader::ComputeGaussian17TapVShader::Program); glUseProgram(FullScreenShader::ComputeGaussian17TapVShader::Program);
glBindImageTexture(0, auxiliary.getRTT()[0], 0, false, 0, GL_READ_ONLY, GL_R16F); glBindImageTexture(0, auxiliary.getRTT()[0], 0, false, 0, GL_READ_ONLY, GL_R16F);
glBindImageTexture(1, in_fbo.getRTT()[0], 0, false, 0, GL_WRITE_ONLY, GL_R16F); glBindImageTexture(1, irr_driver->getFBO(FBO_LINEAR_DEPTH).getRTT()[0], 1, false, 0, GL_READ_ONLY, GL_R32F);
glBindImageTexture(2, in_fbo.getRTT()[0], 0, false, 0, GL_WRITE_ONLY, GL_R16F);
glUniform1i(FullScreenShader::ComputeGaussian17TapVShader::uniform_source, 0); glUniform1i(FullScreenShader::ComputeGaussian17TapVShader::uniform_source, 0);
glUniform1i(FullScreenShader::ComputeGaussian17TapVShader::uniform_dest, 1); glUniform1i(FullScreenShader::ComputeGaussian17TapVShader::uniform_depth, 1);
glUniform1i(FullScreenShader::ComputeGaussian17TapVShader::uniform_dest, 2);
glDispatchCompute(in_fbo.getWidth() / 8, in_fbo.getHeight() / 8, 1); glDispatchCompute(in_fbo.getWidth() / 8, in_fbo.getHeight() / 8, 1);
} }
#endif #endif
@ -477,6 +491,21 @@ void PostProcessing::renderPassThrough(GLuint tex)
glDrawArrays(GL_TRIANGLE_STRIP, 0, 4); glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
} }
void PostProcessing::renderTextureLayer(unsigned tex, unsigned layer)
{
glUseProgram(FullScreenShader::LayerPassThroughShader::Program);
glBindVertexArray(FullScreenShader::LayerPassThroughShader::vao);
glActiveTexture(GL_TEXTURE0);
glBindTexture(GL_TEXTURE_2D_ARRAY, tex);
glTexParameteri(GL_TEXTURE_2D_ARRAY, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D_ARRAY, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glUniform1i(FullScreenShader::LayerPassThroughShader::uniform_texture, 0);
glUniform1i(FullScreenShader::LayerPassThroughShader::uniform_layer, layer);
glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
}
void PostProcessing::renderGlow(unsigned tex) void PostProcessing::renderGlow(unsigned tex)
{ {

View File

@ -90,6 +90,7 @@ public:
/** Render tex. Used for blit/texture resize */ /** Render tex. Used for blit/texture resize */
void renderPassThrough(unsigned tex); void renderPassThrough(unsigned tex);
void renderTextureLayer(unsigned tex, unsigned layer);
void applyMLAA(); void applyMLAA();
void renderMotionBlur(unsigned cam, FrameBuffer &in_fbo, FrameBuffer &out_fbo); void renderMotionBlur(unsigned cam, FrameBuffer &in_fbo, FrameBuffer &out_fbo);

View File

@ -48,6 +48,7 @@
#include "utils/profiler.hpp" #include "utils/profiler.hpp"
#include <algorithm> #include <algorithm>
#include <limits>
#define MAX2(a, b) ((a) > (b) ? (a) : (b)) #define MAX2(a, b) ((a) > (b) ? (a) : (b))
#define MIN2(a, b) ((a) > (b) ? (b) : (a)) #define MIN2(a, b) ((a) > (b) ? (b) : (a))
@ -197,6 +198,10 @@ void IrrDriver::renderGLSL(float dt)
glViewport(viewport.UpperLeftCorner.X, viewport.UpperLeftCorner.Y, viewport.LowerRightCorner.X, viewport.LowerRightCorner.Y); glViewport(viewport.UpperLeftCorner.X, viewport.UpperLeftCorner.Y, viewport.LowerRightCorner.X, viewport.LowerRightCorner.Y);
m_post_processing->renderPassThrough(m_rtts->getRSM().getRTT()[0]); m_post_processing->renderPassThrough(m_rtts->getRSM().getRTT()[0]);
} }
else if (irr_driver->getShadowViz())
{
renderShadowsDebug();
}
else else
fbo->BlitToDefault(viewport.UpperLeftCorner.X, viewport.UpperLeftCorner.Y, viewport.LowerRightCorner.X, viewport.LowerRightCorner.Y); fbo->BlitToDefault(viewport.UpperLeftCorner.X, viewport.UpperLeftCorner.Y, viewport.LowerRightCorner.X, viewport.LowerRightCorner.Y);
} }
@ -535,7 +540,7 @@ void IrrDriver::renderSolidFirstPass()
GLint swizzleMask[] = { GL_ONE, GL_ONE, GL_ONE, GL_ONE }; GLint swizzleMask[] = { GL_ONE, GL_ONE, GL_ONE, GL_ONE };
glTexParameteriv(GL_TEXTURE_2D, GL_TEXTURE_SWIZZLE_RGBA, swizzleMask); glTexParameteriv(GL_TEXTURE_2D, GL_TEXTURE_SWIZZLE_RGBA, swizzleMask);
} }
draw<MeshShader::ObjectPass1Shader>(mesh, mesh.vao_first_pass, GroupedFPSM<FPSM_DEFAULT>::MVPSet[i], GroupedFPSM<FPSM_DEFAULT>::TIMVSet[i], 0); draw<MeshShader::ObjectPass1Shader>(mesh, mesh.vao, GroupedFPSM<FPSM_DEFAULT>::MVPSet[i], GroupedFPSM<FPSM_DEFAULT>::TIMVSet[i], 0);
if (!mesh.textures[0]) if (!mesh.textures[0])
{ {
GLint swizzleMask[] = { GL_RED, GL_GREEN, GL_BLUE, GL_ALPHA }; GLint swizzleMask[] = { GL_RED, GL_GREEN, GL_BLUE, GL_ALPHA };
@ -549,7 +554,7 @@ void IrrDriver::renderSolidFirstPass()
const GLMesh &mesh = *GroupedFPSM<FPSM_ALPHA_REF_TEXTURE>::MeshSet[i]; const GLMesh &mesh = *GroupedFPSM<FPSM_ALPHA_REF_TEXTURE>::MeshSet[i];
compressTexture(mesh.textures[0], true); compressTexture(mesh.textures[0], true);
setTexture(0, getTextureGLuint(mesh.textures[0]), GL_LINEAR, GL_LINEAR_MIPMAP_LINEAR, true); setTexture(0, getTextureGLuint(mesh.textures[0]), GL_LINEAR, GL_LINEAR_MIPMAP_LINEAR, true);
draw<MeshShader::ObjectRefPass1Shader>(mesh, mesh.vao_first_pass, GroupedFPSM<FPSM_ALPHA_REF_TEXTURE>::MVPSet[i], GroupedFPSM<FPSM_ALPHA_REF_TEXTURE>::TIMVSet[i], GroupedFPSM<FPSM_ALPHA_REF_TEXTURE>::MeshSet[i]->TextureMatrix, 0); draw<MeshShader::ObjectRefPass1Shader>(mesh, mesh.vao, GroupedFPSM<FPSM_ALPHA_REF_TEXTURE>::MVPSet[i], GroupedFPSM<FPSM_ALPHA_REF_TEXTURE>::TIMVSet[i], GroupedFPSM<FPSM_ALPHA_REF_TEXTURE>::MeshSet[i]->TextureMatrix, 0);
} }
glUseProgram(MeshShader::NormalMapShader::Program); glUseProgram(MeshShader::NormalMapShader::Program);
for (unsigned i = 0; i < GroupedFPSM<FPSM_NORMAL_MAP>::MeshSet.size(); ++i) for (unsigned i = 0; i < GroupedFPSM<FPSM_NORMAL_MAP>::MeshSet.size(); ++i)
@ -560,7 +565,7 @@ void IrrDriver::renderSolidFirstPass()
setTexture(0, getTextureGLuint(mesh.textures[1]), GL_LINEAR, GL_LINEAR_MIPMAP_LINEAR, true); setTexture(0, getTextureGLuint(mesh.textures[1]), GL_LINEAR, GL_LINEAR_MIPMAP_LINEAR, true);
compressTexture(mesh.textures[0], true); compressTexture(mesh.textures[0], true);
setTexture(1, getTextureGLuint(mesh.textures[0]), GL_LINEAR, GL_LINEAR_MIPMAP_LINEAR, true); setTexture(1, getTextureGLuint(mesh.textures[0]), GL_LINEAR, GL_LINEAR_MIPMAP_LINEAR, true);
draw<MeshShader::NormalMapShader>(mesh, mesh.vao_first_pass, GroupedFPSM<FPSM_NORMAL_MAP>::MVPSet[i], GroupedFPSM<FPSM_NORMAL_MAP>::TIMVSet[i], 0, 1); draw<MeshShader::NormalMapShader>(mesh, mesh.vao, GroupedFPSM<FPSM_NORMAL_MAP>::MVPSet[i], GroupedFPSM<FPSM_NORMAL_MAP>::TIMVSet[i], 0, 1);
} }
} }
} }
@ -648,7 +653,30 @@ void IrrDriver::renderTransparent()
glEnable(GL_BLEND); glEnable(GL_BLEND);
glBlendEquation(GL_FUNC_ADD); glBlendEquation(GL_FUNC_ADD);
glDisable(GL_CULL_FACE); glDisable(GL_CULL_FACE);
TransparentMeshes<TM_DEFAULT>::reset();
TransparentMeshes<TM_ADDITIVE>::reset();
m_scene_manager->drawAll(scene::ESNRP_TRANSPARENT); m_scene_manager->drawAll(scene::ESNRP_TRANSPARENT);
if (World::getWorld() && World::getWorld()->isFogEnabled())
{
glUseProgram(MeshShader::TransparentFogShader::Program);
glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
for (unsigned i = 0; i < TransparentMeshes<TM_DEFAULT>::MeshSet.size(); i++)
drawTransparentFogObject(*TransparentMeshes<TM_DEFAULT>::MeshSet[i], TransparentMeshes<TM_DEFAULT>::MVPSet[i], TransparentMeshes<TM_DEFAULT>::MeshSet[i]->TextureMatrix);
glBlendFunc(GL_ONE, GL_ONE);
for (unsigned i = 0; i < TransparentMeshes<TM_ADDITIVE>::MeshSet.size(); i++)
drawTransparentFogObject(*TransparentMeshes<TM_ADDITIVE>::MeshSet[i], TransparentMeshes<TM_ADDITIVE>::MVPSet[i], TransparentMeshes<TM_ADDITIVE>::MeshSet[i]->TextureMatrix);
}
else
{
glUseProgram(MeshShader::TransparentShader::Program);
glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
for (unsigned i = 0; i < TransparentMeshes<TM_DEFAULT>::MeshSet.size(); i++)
drawTransparentObject(*TransparentMeshes<TM_DEFAULT>::MeshSet[i], TransparentMeshes<TM_DEFAULT>::MVPSet[i], TransparentMeshes<TM_DEFAULT>::MeshSet[i]->TextureMatrix);
glBlendFunc(GL_ONE, GL_ONE);
for (unsigned i = 0; i < TransparentMeshes<TM_ADDITIVE>::MeshSet.size(); i++)
drawTransparentObject(*TransparentMeshes<TM_ADDITIVE>::MeshSet[i], TransparentMeshes<TM_ADDITIVE>::MVPSet[i], TransparentMeshes<TM_ADDITIVE>::MeshSet[i]->TextureMatrix);
}
} }
void IrrDriver::renderParticles() void IrrDriver::renderParticles()
@ -662,8 +690,6 @@ void IrrDriver::renderParticles()
void IrrDriver::computeCameraMatrix(scene::ICameraSceneNode * const camnode, size_t width, size_t height) void IrrDriver::computeCameraMatrix(scene::ICameraSceneNode * const camnode, size_t width, size_t height)
{ {
static int tick = 0;
tick++;
m_scene_manager->drawAll(scene::ESNRP_CAMERA); m_scene_manager->drawAll(scene::ESNRP_CAMERA);
irr_driver->setProjMatrix(irr_driver->getVideoDriver()->getTransform(video::ETS_PROJECTION)); irr_driver->setProjMatrix(irr_driver->getVideoDriver()->getTransform(video::ETS_PROJECTION));
irr_driver->setViewMatrix(irr_driver->getVideoDriver()->getTransform(video::ETS_VIEW)); irr_driver->setViewMatrix(irr_driver->getVideoDriver()->getTransform(video::ETS_VIEW));
@ -707,6 +733,34 @@ void IrrDriver::computeCameraMatrix(scene::ICameraSceneNode * const camnode, siz
camnode->setFarValue(FarValues[i]); camnode->setFarValue(FarValues[i]);
camnode->setNearValue(NearValues[i]); camnode->setNearValue(NearValues[i]);
camnode->render(); camnode->render();
const scene::SViewFrustum *frustrum = camnode->getViewFrustum();
float tmp[24] = {
frustrum->getFarLeftDown().X,
frustrum->getFarLeftDown().Y,
frustrum->getFarLeftDown().Z,
frustrum->getFarLeftUp().X,
frustrum->getFarLeftUp().Y,
frustrum->getFarLeftUp().Z,
frustrum->getFarRightDown().X,
frustrum->getFarRightDown().Y,
frustrum->getFarRightDown().Z,
frustrum->getFarRightUp().X,
frustrum->getFarRightUp().Y,
frustrum->getFarRightUp().Z,
frustrum->getNearLeftDown().X,
frustrum->getNearLeftDown().Y,
frustrum->getNearLeftDown().Z,
frustrum->getNearLeftUp().X,
frustrum->getNearLeftUp().Y,
frustrum->getNearLeftUp().Z,
frustrum->getNearRightDown().X,
frustrum->getNearRightDown().Y,
frustrum->getNearRightDown().Z,
frustrum->getNearRightUp().X,
frustrum->getNearRightUp().Y,
frustrum->getNearRightUp().Z,
};
memcpy(m_shadows_cam[i], tmp, 24 * sizeof(float));
const core::aabbox3df smallcambox = camnode-> const core::aabbox3df smallcambox = camnode->
getViewFrustum()->getBoundingBox(); getViewFrustum()->getBoundingBox();
core::aabbox3df trackbox(vmin->toIrrVector(), vmax->toIrrVector() - core::aabbox3df trackbox(vmin->toIrrVector(), vmax->toIrrVector() -
@ -716,8 +770,35 @@ void IrrDriver::computeCameraMatrix(scene::ICameraSceneNode * const camnode, siz
core::aabbox3df box = smallcambox; core::aabbox3df box = smallcambox;
box = box.intersect(trackbox); box = box.intersect(trackbox);
float xmin = std::numeric_limits<float>::infinity();
SunCamViewMatrix.transformBoxEx(trackbox); float xmax = -std::numeric_limits<float>::infinity();
float ymin = std::numeric_limits<float>::infinity();
float ymax = -std::numeric_limits<float>::infinity();
float zmin = std::numeric_limits<float>::infinity();
float zmax = -std::numeric_limits<float>::infinity();
const vector3df vectors[] =
{
frustrum->getFarLeftDown(),
frustrum->getFarLeftUp(),
frustrum->getFarRightDown(),
frustrum->getFarRightUp(),
frustrum->getNearLeftDown(),
frustrum->getNearLeftUp(),
frustrum->getNearRightDown(),
frustrum->getNearRightUp()
};
for (unsigned j = 0; j < 8; j++)
{
vector3df vector;
SunCamViewMatrix.transformVect(vector, vectors[j]);
xmin = MIN2(xmin, vector.X);
xmax = MAX2(xmax, vector.X);
ymin = MIN2(ymin, vector.Y);
ymax = MAX2(ymax, vector.Y);
zmin = MIN2(zmin, vector.Z);
zmax = MAX2(zmax, vector.Z);
}
/* SunCamViewMatrix.transformBoxEx(trackbox);
SunCamViewMatrix.transformBoxEx(box); SunCamViewMatrix.transformBoxEx(box);
core::vector3df extent = box.getExtent(); core::vector3df extent = box.getExtent();
@ -727,12 +808,12 @@ void IrrDriver::computeCameraMatrix(scene::ICameraSceneNode * const camnode, siz
// Snap to texels // Snap to texels
const float units_per_w = w / 1024; const float units_per_w = w / 1024;
const float units_per_h = h / 1024; const float units_per_h = h / 1024;*/
float left = box.MinEdge.X; float left = xmin;
float right = box.MaxEdge.X; float right = xmax;
float up = box.MaxEdge.Y; float up = ymin;
float down = box.MinEdge.Y; float down = ymax;
core::matrix4 tmp_matrix; core::matrix4 tmp_matrix;
@ -745,15 +826,26 @@ void IrrDriver::computeCameraMatrix(scene::ICameraSceneNode * const camnode, siz
} }
tmp_matrix.buildProjectionMatrixOrthoLH(left, right, tmp_matrix.buildProjectionMatrixOrthoLH(left, right,
up, down, down, up,
30, z); 30, zmax);
m_suncam->setProjectionMatrix(tmp_matrix, true); m_suncam->setProjectionMatrix(tmp_matrix, true);
m_suncam->render(); m_suncam->render();
sun_ortho_matrix.push_back(getVideoDriver()->getTransform(video::ETS_PROJECTION) * getVideoDriver()->getTransform(video::ETS_VIEW)); sun_ortho_matrix.push_back(getVideoDriver()->getTransform(video::ETS_PROJECTION) * getVideoDriver()->getTransform(video::ETS_VIEW));
} }
if ((tick % 100) == 2)
rsm_matrix = sun_ortho_matrix[3]; {
core::aabbox3df trackbox(vmin->toIrrVector(), vmax->toIrrVector() -
core::vector3df(0, 30, 0));
SunCamViewMatrix.transformBoxEx(trackbox);
core::matrix4 tmp_matrix;
tmp_matrix.buildProjectionMatrixOrthoLH(trackbox.MinEdge.X, trackbox.MaxEdge.X,
trackbox.MaxEdge.Y, trackbox.MinEdge.Y,
30, trackbox.MaxEdge.Z);
m_suncam->setProjectionMatrix(tmp_matrix, true);
m_suncam->render();
rsm_matrix = getVideoDriver()->getTransform(video::ETS_PROJECTION) * getVideoDriver()->getTransform(video::ETS_VIEW);
}
rh_extend = core::vector3df(128, 64, 128); rh_extend = core::vector3df(128, 64, 128);
core::vector3df campos = camnode->getAbsolutePosition(); core::vector3df campos = camnode->getAbsolutePosition();
core::vector3df translation(8 * floor(campos.X / 8), 8 * floor(campos.Y / 8), 8 * floor(campos.Z / 8)); core::vector3df translation(8 * floor(campos.X / 8), 8 * floor(campos.Y / 8), 8 * floor(campos.Z / 8));
@ -820,10 +912,40 @@ void IrrDriver::renderShadows()
continue; continue;
compressTexture(mesh.textures[0], true); compressTexture(mesh.textures[0], true);
setTexture(0, getTextureGLuint(mesh.textures[0]), GL_LINEAR, GL_LINEAR_MIPMAP_LINEAR, true); setTexture(0, getTextureGLuint(mesh.textures[0]), GL_LINEAR, GL_LINEAR_MIPMAP_LINEAR, true);
draw<MeshShader::RSMShader>(mesh, mesh.vao_rsm_pass, rsm_matrix, GroupedFPSM<FPSM_DEFAULT>::MVPSet[i], 0); draw<MeshShader::RSMShader>(mesh, mesh.vao, rsm_matrix, GroupedFPSM<FPSM_DEFAULT>::MVPSet[i], 0);
} }
} }
static void renderWireFrameFrustrum(float *tmp, unsigned i)
{
glUseProgram(MeshShader::ViewFrustrumShader::Program);
glBindVertexArray(MeshShader::ViewFrustrumShader::frustrumvao);
glBindBuffer(GL_ARRAY_BUFFER, SharedObject::frustrumvbo);
glBufferSubData(GL_ARRAY_BUFFER, 0, 8 * 3 * sizeof(float), (void *)tmp);
MeshShader::ViewFrustrumShader::setUniforms(video::SColor(255, 0, 255, 0), i);
glDrawElements(GL_LINES, 24, GL_UNSIGNED_INT, 0);
}
void IrrDriver::renderShadowsDebug()
{
glBindFramebuffer(GL_FRAMEBUFFER, 0);
glViewport(0, UserConfigParams::m_height / 2, UserConfigParams::m_width / 2, UserConfigParams::m_height / 2);
m_post_processing->renderTextureLayer(m_rtts->getShadowDepthTex(), 0);
renderWireFrameFrustrum(m_shadows_cam[0], 0);
glViewport(UserConfigParams::m_width / 2, UserConfigParams::m_height / 2, UserConfigParams::m_width / 2, UserConfigParams::m_height / 2);
m_post_processing->renderTextureLayer(m_rtts->getShadowDepthTex(), 1);
renderWireFrameFrustrum(m_shadows_cam[1], 1);
glViewport(0, 0, UserConfigParams::m_width / 2, UserConfigParams::m_height / 2);
m_post_processing->renderTextureLayer(m_rtts->getShadowDepthTex(), 2);
renderWireFrameFrustrum(m_shadows_cam[2], 2);
glViewport(UserConfigParams::m_width / 2, 0, UserConfigParams::m_width / 2, UserConfigParams::m_height / 2);
m_post_processing->renderTextureLayer(m_rtts->getShadowDepthTex(), 3);
renderWireFrameFrustrum(m_shadows_cam[3], 3);
glViewport(0, 0, UserConfigParams::m_width, UserConfigParams::m_height);
}
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
void IrrDriver::renderGlow(std::vector<GlowData>& glows) void IrrDriver::renderGlow(std::vector<GlowData>& glows)

Some files were not shown because too many files have changed in this diff Show More