Skip to content

Commit

Permalink
Added maya area light OSL shader.
Browse files Browse the repository at this point in the history
  • Loading branch information
est77 committed Dec 10, 2016
1 parent 671d2be commit 8d262a6
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/appleseed.shaders/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ source_group ("src\\gaffer" FILES
set (appleseed_maya2_osl_sources
src/maya/as_maya_addDoubleLinear.osl
src/maya/as_maya_addMatrix.osl
src/maya/as_maya_area_light.osl
src/maya/as_maya_blendColors.osl
src/maya/as_maya_bulge.osl
src/maya/as_maya_checker.osl
Expand Down
50 changes: 50 additions & 0 deletions src/appleseed.shaders/src/maya/as_maya_area_light.osl
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@

//
// This source file is part of appleseed.
// Visit http://appleseedhq.net/ for additional information and resources.
//
// This software is released under the MIT license.
//
// Copyright (c) 2016 Esteban Tovagliari, The appleseedhq Organization
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//

surface as_maya_areaLight
[[
string maya_node_name = "areaLight"
]]
(
color in_color = color(1)
[[
string maya_attribute_name = "color",
string maya_attribute_type = "color",
string label = "Color"
]],

float in_intensity = 0
[[
string maya_attribute_name = "intensity",
string maya_attribute_type = "float",
string label = "intensity"
]]
)
{
Ci = in_intensity * in_color * emission();
}

0 comments on commit 8d262a6

Please sign in to comment.