mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-10 18:51:21 +03:00
Graphic3d_CLight is now defined as a class inheriting Standard_Transient, so that it's fields now should be accessed through methods. Graphic3d_CLight::IsEnabled() - new property allowing to disable light source everywhere. Confusing alias OpenGl_Light has been removed. Graphic3d_CLight::SetAttenuation() - the upper limit 1.0 of attenuation factors has been removed since it contradicts to OpenGL specs and does not make sense. Graphic3d_ZLayerSettings::Lights() - light sources list is now property of ZLayer. When defined, it overrides light sources defined for View/Viewer. New class Graphic3d_LightSet has been defined to define a set of light sources. V3d_Light - removed obsolete interface for debug drawing lights sources. V3d_Light is now an alias to Graphic3d_CLight. V3d_TypeOfLight is now defined as a typedef to Graphic3d_TypeOfLightSource.
43 lines
950 B
Plaintext
43 lines
950 B
Plaintext
puts "========"
|
|
puts "OCC24855: Revision of parameters of standard materials"
|
|
puts "========"
|
|
|
|
# custom shapes
|
|
set aShape [locate_data_file occ/Top.brep]
|
|
|
|
# setup 3D viewer content
|
|
vinit View1 w=768 h=768
|
|
vglinfo
|
|
|
|
vsetgradientbg 180 200 255 180 180 180 2
|
|
|
|
# display shape
|
|
vlight -change 0 -dir 0.577 -0.577 -0.577
|
|
restore $aShape s
|
|
vsetdispmode 1
|
|
vdisplay s
|
|
vfit
|
|
|
|
proc testmat {dirname filename} {
|
|
foreach {aMatIter} {brass bronze copper gold jade neon_phc pewter obsidian plaster plastic satin silver steel stone chrome aluminium charcoal} {
|
|
vsetmaterial -noredraw s $aMatIter
|
|
vdump $dirname/${filename}_${aMatIter}.png
|
|
}
|
|
}
|
|
|
|
# make material screenshots
|
|
testmat $imagedir $casename
|
|
|
|
vshaderprog s phong
|
|
testmat $imagedir ${casename}_phong
|
|
|
|
vrenderparams -raytrace -reflections -fsaa
|
|
vtextureenv on 5
|
|
|
|
testmat $imagedir ${casename}_rt
|
|
|
|
vclear
|
|
vrenderparams -rasterization
|
|
vtextureenv off
|
|
source $env(CSF_OCCTSamplesPath)/tcl/materials.tcl
|