Code Monkey home page Code Monkey logo

source-pbr's Introduction

               SOURCE 1 SDK LICENSE

Source SDK Copyright(c) Valve Corp.  

THIS DOCUMENT DESCRIBES A CONTRACT BETWEEN YOU AND VALVE 
CORPORATION ("Valve").  PLEASE READ IT BEFORE DOWNLOADING OR USING 
THE SOURCE ENGINE SDK ("SDK"). BY DOWNLOADING AND/OR USING THE 
SOURCE ENGINE SDK YOU ACCEPT THIS LICENSE. IF YOU DO NOT AGREE TO 
THE TERMS OF THIS LICENSE PLEASE DON’T DOWNLOAD OR USE THE SDK.  

  You may, free of charge, download and use the SDK to develop a modified Valve game 
running on the Source engine.  You may distribute your modified Valve game in source and 
object code form, but only for free. Terms of use for Valve games are found in the Steam 
Subscriber Agreement located here: http://store.steampowered.com/subscriber_agreement/ 

  You may copy, modify, and distribute the SDK and any modifications you make to the 
SDK in source and object code form, but only for free.  Any distribution of this SDK must 
include this LICENSE file and thirdpartylegalnotices.txt.  
 
  Any distribution of the SDK or a substantial portion of the SDK must include the above 
copyright notice and the following: 

    DISCLAIMER OF WARRANTIES.  THE SOURCE SDK AND ANY 
    OTHER MATERIAL DOWNLOADED BY LICENSEE IS PROVIDED 
    "AS IS".  VALVE AND ITS SUPPLIERS DISCLAIM ALL 
    WARRANTIES WITH RESPECT TO THE SDK, EITHER EXPRESS 
    OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, IMPLIED 
    WARRANTIES OF MERCHANTABILITY, NON-INFRINGEMENT, 
    TITLE AND FITNESS FOR A PARTICULAR PURPOSE.  

    LIMITATION OF LIABILITY.  IN NO EVENT SHALL VALVE OR 
    ITS SUPPLIERS BE LIABLE FOR ANY SPECIAL, INCIDENTAL, 
    INDIRECT, OR CONSEQUENTIAL DAMAGES WHATSOEVER 
    (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF 
    BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF 
    BUSINESS INFORMATION, OR ANY OTHER PECUNIARY LOSS) 
    ARISING OUT OF THE USE OF OR INABILITY TO USE THE 
    ENGINE AND/OR THE SDK, EVEN IF VALVE HAS BEEN 
    ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.  
 
       
If you would like to use the SDK for a commercial purpose, please contact Valve at 
[email protected].

source-pbr's People

Contributors

alanedwardes avatar alfred-valve avatar bonjorno7 avatar bruced-valve avatar geekidos avatar gocnak avatar joeludwig avatar jorgenpt avatar jstasiak avatar mikesartain avatar narendraumate avatar neico avatar nephyrin avatar plesiecki avatar psychonic avatar sears2424 avatar sortie avatar thexa4 avatar untodesu avatar yurannnzzz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

source-pbr's Issues

Strange bug over brightening meshes with a projectedtexture.

I've had this bug for a while, completely unsure as to what it could be.

Whenever a projectedtexture is cast from a relatively far distance onto a model, it seems to render the model at max brightness no matter what the actual lamp's brightness value is.

Examples:

Mesh over brightening:
image

The lamp's brightness values:
image

update: OK, it seems to be an issue regarding the FarZ of the projectedtexture. By the looks of it, the shader doesn't account for possible loss in brightness when the lamp is cast from far away with a high FarZ value, instead what I think it does is take the default FarZ value of 1024 and keeps the brightness from that value meaning it doesn't update with the changes to the FarZ value.

Which explains as to why projectedtextures look absolutely fine from up close (player flashlights), but seem to mess up once the projectedtexture is casted from far away.

Parallax not working.

hi there!

the $useparallax to 1, is not working.

neither on models or brushes, do you know why? and how to get this fixed.

any help would be so much appreciated, because there is no Parallax is any open source, only outdated ones.
i really need parallax to work, that would be a dream.

     "$useparallax"	"1"
"$parallaxdepth"	"600" (to see if there is any different changes)
"$parallaxcenter"	"1"

thank you for making this!!!
and thank you for reading.

SP branch crash due to an unsupported register

It crashes when you do mat_reloadallmaterials

The reason is that Source 2013SP does not support registers higher than c31 while this shader uses hardcoded c40.
Changing it to generally free c27 fixes everything.

Undeclared Identifiers in pbr_dx9.cpp

when trying to build the game on Windows 10, I get this error in the build:

'3>d:\game projects\source sdk 2013 pbr\mp\src\materialsystem\stdshaders\pbr_dx9.cpp(251): error C2039: 'SetUSEENVAMBIENT' : is not a member of 'pbr_ps30_Static_Index'
3> d:\game projects\source sdk 2013 pbr\mp\src\materialsystem\stdshaders\fxctmp9\pbr_ps30.inc(3) : see declaration of 'pbr_ps30_Static_Index'
3>d:\game projects\source sdk 2013 pbr\mp\src\materialsystem\stdshaders\pbr_dx9.cpp(252): error C2039: 'SetEMISSIVE' : is not a member of 'pbr_ps30_Static_Index'
3> d:\game projects\source sdk 2013 pbr\mp\src\materialsystem\stdshaders\fxctmp9\pbr_ps30.inc(3) : see declaration of 'pbr_ps30_Static_Index'
3>d:\game projects\source sdk 2013 pbr\mp\src\materialsystem\stdshaders\pbr_dx9.cpp(253): error C2065: 'psh_forgot_to_set_static_CONVERT_TO_SRGB' : undeclared identifier'

I have successfully built the official SDK before, so I know that my config is not an issue.

error X4018: Shader uses texture addressing operations in a dependency chain that is too complex for the target shader model (ps_2_b) to handle.

pbr_ps20b 3 ERROR(S):
error X4018: Shader uses texture addressing operations in a dependency chain that is too complex for the target shader model (ps_2_b) to handle.
Reported 3360 time(s), example command:
fxc /DCENTROIDMASK=0 /DSHADERCOMBO=3bff /DSHADER_MODEL_PS_2_B=1 /Tps_2_b /Emain /DWRITEWATERFOGTODESTALPHA=1 /DPIXELFOGTYPE=1 /DNUM_LIGHTS=4 /DWRITE_DEPTH_TO_DESTALPHA=1 /DFLASHLIGHTSHADOWS=1 /DFLASHLIGHT=1 /DFLASHLIGHTDEPTHFILTERMODE=2 /DLIGHTMAPPED=1 /DUSEENVAMBIENT=1 /DEMISSIVE=1 /DSPECULAR=1 /DPARALLAXOCCLUSION=1 pbr_ps30.fxc
pbr_common_ps2_3_x.h(61,19-25): error X4532: cannot map expression to pixel shader instruction set
Reported 240 time(s), example command:
fxc /DCENTROIDMASK=0 /DSHADERCOMBO=1c43 /DSHADER_MODEL_PS_2_B=1 /Tps_2_b /Emain /DWRITEWATERFOGTODESTALPHA=1 /DPIXELFOGTYPE=1 /DNUM_LIGHTS=3 /DWRITE_DEPTH_TO_DESTALPHA=1 /DFLASHLIGHTSHADOWS=0 /DFLASHLIGHT=0 /DFLASHLIGHTDEPTHFILTERMODE=0 /DLIGHTMAPPED=1 /DUSEENVAMBIENT=1 /DEMISSIVE=1 /DSPECULAR=1 /DPARALLAXOCCLUSION=0 pbr_ps30.fxc
pbr_common_ps2_3_x.h(59,18-23): error X4532: cannot map expression to pixel shader instruction set
Reported 3120 time(s), example command:
fxc /DCENTROIDMASK=0 /DSHADERCOMBO=1dff /DSHADER_MODEL_PS_2_B=1 /Tps_2_b /Emain /DWRITEWATERFOGTODESTALPHA=1 /DPIXELFOGTYPE=1 /DNUM_LIGHTS=4 /DWRITE_DEPTH_TO_DESTALPHA=1 /DFLASHLIGHTSHADOWS=1 /DFLASHLIGHT=1 /DFLASHLIGHTDEPTHFILTERMODE=2 /DLIGHTMAPPED=1 /DUSEENVAMBIENT=1 /DEMISSIVE=1 /DSPECULAR=1 /DPARALLAXOCCLUSION=0 pbr_ps30.fxc
FAILED: pbr_ps20b
4 minutes, 4 seconds elapsed
07:31 PM

Press any key to continue . . .

get this on source sdk 2013 multiplayer shader compile.

Adding any kind of transparency to the material breaks it

Using $translucent or $alphatest in a PBR material makes it invisible.


After adding $translucent "1" or $alphatest "1":

And it's not a problem with the texture itself, here's the same material but with VertexLitGeneric shader and $translucent "1":

Grab a programmer!

Hey. I tried to transfer your PBR to my project with a few corrections. Everything was successfully compiled. The game complains of an error and does not show the texture. Materials for PBR prepared.

Bumpmap

Houston we have a problem. Bumpmap does not want to work on the new shader. What the problem is is not clear.
Checked both $normaltexture and $bumpmap. Nothing works. Models remain smooth.

Support AlienSwarm branch

It doesn't have some methods like:
" SetModulationPixelShaderDynamicState_LinearColorSpace"
"pShaderAPI->SetPixelShaderStateAmbientLightCube"
...

Overbright on brushes

C9O3{N5I0K568N%)WMI1Z1A

If I add $model 1 in the VMTs, overbright disappers, but the reflection is not working as expected
$H)KUGGI1Q 9 $M3YNH XRC
AEETG(9SG%V)PMGK_H AR37
Reflection will changes while player is moving

$Alphatest causing models to go dark

When shining a light (flashlight typically), on any model that uses $alphatest; causes the model to not take light properly-even without the flashlight. Below are two images; one with the alpha on, and the other off.
image
image

You can see how the light affects the one with it off, as a model typically should look if a light is shined on it. Puzzled as to why this is the case, below are the VMT parameters for the Body, cape isn't any different.

"PBR"
{
	"$basetexture" 			"models/souls/ds3/c1280/var1_body_a"
	"$bumpmap"       		"models/souls/ds3/c1280/var1_body_n"
	"$mraotexture"   		"models/souls/ds3/c1280/var1_body_mrao"
	"$speculartexture"  	        "models/souls/ds3/c1280/var1_body_r"
	"$envmap"        		"env_cubemap"

	"$surfaceprop"   		"metal"
	"$model"         		"1"
	"$alphatest"			"1"
	"$alphatestreference"	        "0.6"
}

Creating a large pack with this shader would be beneficial for Garry's Mod, especially if it garners a lot of attention. Issues with lighting regarding the $alphatest, are problematic; personally, I'm not sure if there's ways around this that I'm not aware of. When the pack is uploaded, I'll provide a link here should it gather a large group of people; maybe then, Rubat might actually make it required--if he sees a real need for it.

Prop_Static does not render correctly.

The pbr shader only seems to work right on prop_dynamic, prop_static will only give off a convincing pbr effect when an env_projectedtexture is used.
shadertest0000
Flashlight off ^^
shadertest0001
Flashlight on ^^

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.