Blender  V3.3
emissive.cpp
Go to the documentation of this file.
1 /* SPDX-License-Identifier: BSD-3-Clause
2  *
3  * Adapted from Open Shading Language
4  * Copyright (c) 2009-2010 Sony Pictures Imageworks Inc., et al.
5  * All Rights Reserved.
6  *
7  * Modifications Copyright 2011-2022 Blender Foundation. */
8 
9 #include <OpenImageIO/fmath.h>
10 
11 #include <OSL/genclosure.h>
12 
13 #include "kernel/osl/closures.h"
14 
15 // clang-format off
17 #include "kernel/types.h"
18 #include "kernel/closure/alloc.h"
20 // clang-format on
21 
23 
24 using namespace OSL;
25 
34  public:
35  void setup(ShaderData *sd, uint32_t /* path_flag */, float3 weight)
36  {
37  emission_setup(sd, weight);
38  }
39 };
40 
41 ClosureParam *closure_emission_params()
42 {
43  static ClosureParam params[] = {CLOSURE_STRING_KEYPARAM(GenericEmissiveClosure, label, "label"),
44  CLOSURE_FINISH_PARAM(GenericEmissiveClosure)};
45  return params;
46 }
47 
49 
void setup(ShaderData *sd, uint32_t, float3 weight)
Definition: emissive.cpp:35
void closure_emission_prepare(OSL::RendererServices *, int id, void *data)
#define CCLOSURE_PREPARE(name, classname)
Definition: closures.h:70
#define CCL_NAMESPACE_END
Definition: cuda/compat.h:9
const char * label
ClosureParam * closure_emission_params()
Definition: emissive.cpp:41
ccl_device void emission_setup(ccl_private ShaderData *sd, const float3 weight)
Definition: emissive.h:28
uiWidgetBaseParameters params[MAX_WIDGET_BASE_BATCH]
ShaderData
Definition: kernel/types.h:925
unsigned int uint32_t
Definition: stdint.h:80